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

58 lines
1.2 KiB

2 months ago
1 month ago
2 months ago
1 month 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 = 'prod'
  8. // 环境配置
  9. const config = {
  10. dev : {
  11. // baseUrl : 'http://test-lzx.natapp1.cc/popularize-admin',
  12. baseUrl : 'http://h5.xzaiyp.top/popularize-admin',
  13. },
  14. prod : {
  15. // baseUrl : 'http://test-lzx.natapp1.cc/popularize-admin',
  16. // baseUrl : 'http://h5.xzaiyp.top/popularize-admin',
  17. baseUrl : 'https://popularize-admin.hhlm1688.com/popularize-admin',
  18. }
  19. }
  20. // 默认配置
  21. const defaultConfig = {
  22. mapKey : 'DGFBZ-JU76M-34A63-6BU47-2FLJH-XLBCN',
  23. aliOss : {
  24. url : 'https://image.hhlm1688.com/',
  25. config : {
  26. //桶的地址
  27. region: 'oss-cn-shenzhen',
  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