【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.

71 lines
1.5 KiB

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