珠宝小程序前端代码
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.

57 lines
1.1 KiB

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