环卫车小程序前端代码
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.

52 lines
997 B

4 months ago
  1. import Vue from 'vue'
  2. import utils from './utils/utils.js'
  3. // 当前环境
  4. const type = 'prod'
  5. // 环境配置
  6. const config = {
  7. dev : {
  8. baseUrl : 'http://augcl.natapp1.cc/employ-api',
  9. },
  10. prod : {
  11. baseUrl : 'https://employadmin.augcl.com/employ-api',
  12. }
  13. }
  14. // 默认配置
  15. const defaultConfig = {
  16. mapKey : 'XMBBZ-BCPCV-SXPPQ-5Y7MY-PHZXK-YFFVU',
  17. aliOss : {
  18. url : 'https://tennis-oss.xzaiyp.top/',
  19. config : {
  20. //桶的地址
  21. region: 'oss-cn-guangzhou',
  22. //id
  23. accessKeyId:'LTAI5tNycA46YTwm383dRvMV',
  24. //密钥
  25. accessKeySecret:'tAdbYQCmdur6jbZ8hjvgB7T1Z52mIG',
  26. //桶的名字
  27. bucket: 'zhuoqiu-image',
  28. endpoint:'oss-cn-guangzhou.aliyuncs.com',
  29. }
  30. },
  31. }
  32. uni.$u.setConfig({
  33. // 修改$uv.config对象的属性
  34. config: {
  35. // 修改默认单位为rpx,相当于执行 uni.$uv.config.unit = 'rpx'
  36. unit: 'px'
  37. },
  38. })
  39. Vue.prototype.$config = utils.deepMergeObject(defaultConfig, config[type])
  40. // Vue.prototype.$api = api
  41. export default Vue.prototype.$config