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

111 lines
2.2 KiB

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