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

59 lines
1.3 KiB

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