景徳镇旅游微信小程序
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.

126 lines
2.6 KiB

8 months ago
3 months ago
8 months ago
8 months ago
5 months ago
8 months ago
5 months ago
5 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
7 months ago
8 months ago
8 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://augcl.natapp1.cc/travel-api/api',
  12. },
  13. prod : {
  14. baseUrl : 'https://www.cywhyc.com.cn/travel-api/api',
  15. // baseUrl : 'https://traveladmin.augcl.com/travel-api/api',
  16. },
  17. prod2 : {
  18. baseUrl : 'https://traveladmin.hhlm1688.com/travel-api/api',
  19. },
  20. }
  21. // 默认配置
  22. const defaultConfig = {
  23. mapKey : 'SNGBZ-K6AKJ-5X2FI-XYKCM-DEZXZ-FGBA3',
  24. // aliOss: {
  25. // url: 'https://image.hhlm1688.com/',
  26. // config: {
  27. // //桶的地址
  28. // region: 'oss-cn-guangzhou',
  29. // //id
  30. // accessKeyId: 'LTAI5tQSs47izVy8DLVdwUU9',
  31. // //密钥
  32. // accessKeySecret: 'qHI7C3PaXYZySr84HTToviC71AYlFq',
  33. // //桶的名字
  34. // bucket: 'hanhaiimage',
  35. // endpoint: 'oss-cn-shenzhen.aliyuncs.com',
  36. // }
  37. // },
  38. aliOss: {
  39. url: 'https://img.cywhyc.com.cn/',
  40. config: {
  41. //桶的地址
  42. region: 'oss-cn-shanghai',
  43. //id
  44. accessKeyId: 'LTAI5t6zzrU86ADa5wW6yFrp',
  45. //密钥
  46. accessKeySecret: '2BddrzvyjiACTIDeuS2cCqrqAQuwco',
  47. //桶的名字
  48. bucket: 'cywhyc',
  49. endpoint: 'oss-cn-shanghai.aliyuncs.com',
  50. }
  51. },
  52. dict : {
  53. course : {//申遗历程
  54. title : '申遗历程',
  55. api : 'queryArticleById',
  56. },
  57. Inheritance : {//遗产概况
  58. title : '文化遗产',
  59. api : 'querySpotById',
  60. },
  61. tell : {//遗产讲述
  62. title : '遗产讲述',
  63. collectType : 0,
  64. subTitle : '讲解现场',
  65. payType : 1,
  66. screen : true,
  67. roleId : 0,
  68. showRoleLevel : true,
  69. },
  70. travel : {//达人同游
  71. title : '达人同游',
  72. collectType : 1,
  73. subTitle : '同游现场',
  74. payType : 2,
  75. roleId : 1,
  76. },
  77. path : {//遗产路径
  78. title : '遗产路径',
  79. collectType : 2,
  80. payType : 0,
  81. },
  82. follow : {//我要跟拍
  83. title : '我要跟拍',
  84. collectType : 3,
  85. subTitle : '跟拍现场',
  86. payType : 3,
  87. roleId : 2,
  88. },
  89. experience : {//非遗体验
  90. title : '非遗体验',
  91. collectType : 4,
  92. payType : 4,
  93. api : 'queryExperienceById',
  94. },
  95. Study : {//我要研学
  96. title : '我要研学',
  97. collectType : 5,
  98. payType : 5,
  99. },
  100. good : {//文创好物
  101. title : '文创好物',
  102. collectType : 6,
  103. },
  104. }
  105. }
  106. uni.$uv.setConfig({
  107. // 修改$uv.config对象的属性
  108. config: {
  109. // 修改默认单位为rpx,相当于执行 uni.$uv.config.unit = 'rpx'
  110. unit: 'rpx'
  111. },
  112. })
  113. Vue.prototype.$config = utils.deepMergeObject(defaultConfig, config[type])
  114. Vue.prototype.$api = api
  115. export default Vue.prototype.$config