推拿小程序前端代码仓库
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.4 KiB

3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
  1. import Vue from 'vue'
  2. import api from '@/api/api.js'
  3. import fetch from '@/api/fetch.js'
  4. import utils from './utils/utils.js'
  5. import uvUI from '@/uni_modules/uv-ui-tools'
  6. Vue.use(uvUI);
  7. // 当前环境
  8. const type = 'prod'
  9. // 环境配置
  10. const config = {
  11. dev: {
  12. baseUrl: 'http://augcl.natapp1.cc/massage-admin/massage',
  13. // redirect : 'http://h5.xzaiyp.top',
  14. redirect : 'https://wwwh5.yurangongfang.com',
  15. },
  16. prod: {
  17. baseUrl: 'https://www.yurangongfang.com/massage-admin/massage',
  18. // baseUrl: 'https://www.yurangongfang.com/massage-admin/massage',
  19. redirect : 'https://wwwh5.yurangongfang.com',
  20. },
  21. }
  22. // 默认配置
  23. const defaultConfig = {
  24. mapKey: 'XMBBZ-BCPCV-SXPPQ-5Y7MY-PHZXK-YFFVU',
  25. aliOss: {
  26. url: 'https://image.hhlm1688.com/',
  27. config: {
  28. //桶的地址
  29. region: 'oss-cn-guangzhou',
  30. //id
  31. accessKeyId: 'LTAI5tQSs47izVy8DLVdwUU9',
  32. //密钥
  33. accessKeySecret: 'qHI7C3PaXYZySr84HTToviC71AYlFq',
  34. //桶的名字
  35. bucket: 'hanhaiimage',
  36. endpoint: 'oss-cn-shenzhen.aliyuncs.com',
  37. }
  38. },
  39. //商户号
  40. mchId : '1712378227',
  41. appId : 'wxb1c123a63736f789',
  42. }
  43. uni.$uv.setConfig({
  44. // 修改$uv.config对象的属性
  45. config: {
  46. // 修改默认单位为rpx,相当于执行 uni.$uv.config.unit = 'rpx'
  47. unit: 'rpx'
  48. },
  49. })
  50. Vue.prototype.$config = utils.deepMergeObject(defaultConfig, config[type])
  51. Vue.prototype.$api = api
  52. Vue.prototype.$fetch = fetch
  53. export default Vue.prototype.$config