【PT.SCC实名制管理系统】24.10.01 -30天,考勤打卡小程序
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.

72 lines
1.5 KiB

1 year ago
1 year ago
1 year ago
8 months ago
11 months ago
8 months ago
1 year ago
8 months ago
1 year ago
8 months ago
1 year ago
8 months ago
1 year ago
8 months ago
1 year ago
8 months ago
1 year ago
8 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 = 'dev'
  8. // 环境配置
  9. const config = {
  10. dev: {
  11. baseUrl: 'http://h5.xzaiyp.top/clockin-api',
  12. // baseUrl: 'http://127.0.0.1:8083/clockin-api',
  13. },
  14. test: {
  15. baseUrl: 'https://clockin.java996.icu/clockin-api',
  16. },
  17. prod: {
  18. baseUrl: 'https://admin.ptchemicalscc.com/clockin-api',
  19. }
  20. }
  21. // 默认配置
  22. const defaultConfig = {
  23. mapKey: 'XMBBZ-BCPCV-SXPPQ-5Y7MY-PHZXK-YFFVU',
  24. aliOss: {
  25. url: 'https://image.ptchemicalscc.com/',
  26. config: {
  27. //桶的地址
  28. region: 'oss-cn-beijing',
  29. //id
  30. accessKeyId: 'LTAI5tA1mo2mRHVwKLLE2V7Y',
  31. //密钥
  32. accessKeySecret: 'PBs2Dx3mTuVSH7ReWkiZGW3Vc9i22I',
  33. //桶的名字
  34. bucket: 'ptchemicalscc',
  35. endpoint: 'oss-cn-beijing.aliyuncs.com',
  36. }
  37. },
  38. // aliOss: {
  39. // url: 'https://image.hhlm1688.com/',
  40. // config: {
  41. // //桶的地址
  42. // region: 'oss-cn-guangzhou',
  43. // //id
  44. // accessKeyId: 'LTAI5tQSs47izVy8DLVdwUU9',
  45. // //密钥
  46. // accessKeySecret: 'qHI7C3PaXYZySr84HTToviC71AYlFq',
  47. // //桶的名字
  48. // bucket: 'hanhaiimage',
  49. // endpoint: 'oss-cn-shenzhen.aliyuncs.com',
  50. // }
  51. // },
  52. }
  53. uni.$uv.setConfig({
  54. // 修改$uv.config对象的属性
  55. config: {
  56. // 修改默认单位为rpx,相当于执行 uni.$uv.config.unit = 'rpx'
  57. unit: 'rpx'
  58. },
  59. })
  60. Vue.prototype.$config = utils.deepMergeObject(defaultConfig, config[type])
  61. Vue.prototype.$api = api
  62. export default Vue.prototype.$config