裂变星小程序-25.03.04
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

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