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

112 lines
2.2 KiB

8 months ago
3 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 = '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. dict : {
  39. course : {//申遗历程
  40. title : '申遗历程',
  41. api : 'queryArticleById',
  42. },
  43. Inheritance : {//遗产概况
  44. title : '文化遗产',
  45. api : 'querySpotById',
  46. },
  47. tell : {//遗产讲述
  48. title : '遗产讲述',
  49. collectType : 0,
  50. subTitle : '讲解现场',
  51. payType : 1,
  52. screen : true,
  53. roleId : 0,
  54. showRoleLevel : true,
  55. },
  56. travel : {//达人同游
  57. title : '达人同游',
  58. collectType : 1,
  59. subTitle : '同游现场',
  60. payType : 2,
  61. roleId : 1,
  62. },
  63. path : {//遗产路径
  64. title : '遗产路径',
  65. collectType : 2,
  66. payType : 0,
  67. },
  68. follow : {//我要跟拍
  69. title : '我要跟拍',
  70. collectType : 3,
  71. subTitle : '跟拍现场',
  72. payType : 3,
  73. roleId : 2,
  74. },
  75. experience : {//非遗体验
  76. title : '非遗体验',
  77. collectType : 4,
  78. payType : 4,
  79. api : 'queryExperienceById',
  80. },
  81. Study : {//我要研学
  82. title : '我要研学',
  83. collectType : 5,
  84. payType : 5,
  85. },
  86. good : {//文创好物
  87. title : '文创好物',
  88. collectType : 6,
  89. },
  90. }
  91. }
  92. uni.$uv.setConfig({
  93. // 修改$uv.config对象的属性
  94. config: {
  95. // 修改默认单位为rpx,相当于执行 uni.$uv.config.unit = 'rpx'
  96. unit: 'rpx'
  97. },
  98. })
  99. Vue.prototype.$config = utils.deepMergeObject(defaultConfig, config[type])
  100. Vue.prototype.$api = api
  101. export default Vue.prototype.$config