瑶都万能墙
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.2 KiB

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