珠宝小程序前端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

60 lines
1.2 KiB

3 months ago
1 month ago
3 months ago
1 month ago
3 months ago
3 months ago
1 month ago
3 months ago
1 month ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
  1. import Vue from 'vue'
  2. import api from '@/api/api.js'
  3. import utils from './utils/utils.js'
  4. import uvUI from '@/uni_modules/uv-ui-tools'
  5. Vue.use(uvUI);
  6. // 当前环境
  7. const type = 'test'
  8. // 环境配置
  9. const config = {
  10. local : {
  11. baseUrl: 'http://127.0.0.1:8001/jewelry-admin',
  12. },
  13. dev: {
  14. baseUrl: 'http://h5.xzaiyp.top/jewelry-admin',
  15. },
  16. test: {
  17. baseUrl: 'https://jewelry-admin.hhlm1688.com/jewelry-admin',
  18. },
  19. prod: {
  20. baseUrl: 'https://admin.momeirenzhubao.com/jewelry-admin',
  21. },
  22. }
  23. // 默认配置
  24. const defaultConfig = {
  25. mapKey: 'XMBBZ-BCPCV-SXPPQ-5Y7MY-PHZXK-YFFVU',
  26. aliOss: {
  27. url: 'https://image.hhlm1688.com/',
  28. config: {
  29. //桶的地址
  30. region: 'oss-cn-guangzhou',
  31. //id
  32. accessKeyId: 'LTAI5tQSs47izVy8DLVdwUU9',
  33. //密钥
  34. accessKeySecret: 'qHI7C3PaXYZySr84HTToviC71AYlFq',
  35. //桶的名字
  36. bucket: 'hanhaiimage',
  37. endpoint: 'oss-cn-shenzhen.aliyuncs.com',
  38. }
  39. },
  40. }
  41. uni.$uv.setConfig({
  42. // 修改$uv.config对象的属性
  43. config: {
  44. // 修改默认单位为rpx,相当于执行 uni.$uv.config.unit = 'rpx'
  45. unit: 'rpx'
  46. },
  47. })
  48. Vue.prototype.$config = utils.deepMergeObject(defaultConfig, config[type])
  49. Vue.prototype.$api = api
  50. export default Vue.prototype.$config