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

108 lines
2.1 KiB

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