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

61 lines
1.3 KiB

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