加油站付款小程序,打印小票
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.

62 lines
1.3 KiB

6 months ago
6 months ago
6 months ago
6 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 = 'prod2'
  8. // 环境配置
  9. const config = {
  10. dev : {
  11. // baseUrl : 'http://8.138.162.67:8000/a-notice-api',
  12. baseUrl : 'http://h5.xzaiyp.top/cheer-admin',
  13. },
  14. prod : {//第一版本生产环境
  15. baseUrl : 'https://cheer-admin.xzaiyp.top/cheer-admin',
  16. },
  17. prod2 : {//第二版本生产环境
  18. baseUrl : 'https://cheer-prod.hhlm1688.com/cheer-prod/',
  19. },
  20. // prod3 : {
  21. // baseUrl : 'https://cheer-admin.xzaiyp.top/cheer-admin',
  22. // }
  23. }
  24. // 默认配置
  25. const defaultConfig = {
  26. mapKey : 'XMBBZ-BCPCV-SXPPQ-5Y7MY-PHZXK-YFFVU',
  27. aliOss : {
  28. url : 'https://tennis-oss.xzaiyp.top/',
  29. config : {
  30. //桶的地址
  31. region: 'oss-cn-guangzhou',
  32. //id
  33. accessKeyId:'LTAI5tNycA46YTwm383dRvMV',
  34. //密钥
  35. accessKeySecret:'tAdbYQCmdur6jbZ8hjvgB7T1Z52mIG',
  36. //桶的名字
  37. bucket: 'zhuoqiu-image',
  38. endpoint:'oss-cn-guangzhou.aliyuncs.com',
  39. }
  40. },
  41. }
  42. uni.$uv.setConfig({
  43. // 修改$uv.config对象的属性
  44. config: {
  45. // 修改默认单位为rpx,相当于执行 uni.$uv.config.unit = 'rpx'
  46. unit: 'rpx'
  47. },
  48. })
  49. Vue.prototype.$config = utils.deepMergeObject(defaultConfig, config[type])
  50. Vue.prototype.$api = api
  51. export default Vue.prototype.$config