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

60 lines
1.2 KiB

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 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 = 'dev'
  9. // 环境配置
  10. const config = {
  11. dev : {
  12. baseUrl : 'http://h5.xzaiyp.top/lbx-api',
  13. },
  14. test : {
  15. baseUrl : 'https://fission-star-api.hhlm1688.com/lbx-api',
  16. },
  17. prod : {
  18. baseUrl : 'https://www.liebianxing.site/lbx-api',
  19. }
  20. }
  21. // 默认配置
  22. const defaultConfig = {
  23. mapKey : 'XMBBZ-BCPCV-SXPPQ-5Y7MY-PHZXK-YFFVU',
  24. aliOss: {
  25. url: 'https://image.hhlm1688.com/',
  26. config: {
  27. //桶的地址
  28. region: 'oss-cn-guangzhou',
  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. Vue.prototype.$fetch = fetch
  49. export default Vue.prototype.$config