用工小程序前端代码
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

6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 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://oss.zhixuanlietou.com/',
  19. config : {
  20. //桶的地址
  21. region: 'oss-cn-beijing',
  22. //id
  23. accessKeyId:'LTAI5t7QjvTcHz9rnULaKuU1',
  24. //密钥
  25. accessKeySecret:'Kc9bnuNK2k9FIMeupHyTLnQX7JjHqj',
  26. //桶的名字
  27. bucket: 'zxltoss',
  28. endpoint:'oss-cn-beijing.aliyuncs.com',
  29. }
  30. },
  31. /**
  32. * accessKey: LTAI5t7QjvTcHz9rnULaKuU1
  33. secretKey: Kc9bnuNK2k9FIMeupHyTLnQX7JjHqj
  34. endpoint: oss-cn-beijing.aliyuncs.com
  35. bucketName: zxltoss
  36. staticDomain: https://oss.zhixuanlietou.com
  37. */
  38. }
  39. uni.$u.setConfig({
  40. // 修改$uv.config对象的属性
  41. config: {
  42. // 修改默认单位为rpx,相当于执行 uni.$uv.config.unit = 'rpx'
  43. unit: 'px'
  44. },
  45. })
  46. Vue.prototype.$config = utils.deepMergeObject(defaultConfig, config[type])
  47. // Vue.prototype.$api = api
  48. export default Vue.prototype.$config