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

63 lines
1.2 KiB

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