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

113 lines
2.2 KiB

import Vue from 'vue'
import api from '@/api/api.js'
import utils from './utils/utils.js'
import uvUI from '@/uni_modules/uv-ui-tools'
Vue.use(uvUI);
// 当前环境
const type = 'prod'
// 环境配置
const config = {
dev : {
baseUrl : 'http://augcl.natapp1.cc/travel-api/api',
},
prod : {
baseUrl : 'https://www.cywhyc.com.cn/travel-api/api',
// baseUrl : 'https://traveladmin.augcl.com/travel-api/api',
},
prod2 : {
baseUrl : 'https://traveladmin.hhlm1688.com/travel-api/api',
},
}
// 默认配置
const defaultConfig = {
mapKey : 'SNGBZ-K6AKJ-5X2FI-XYKCM-DEZXZ-FGBA3',
aliOss: {
url: 'https://image.hhlm1688.com/',
config: {
//桶的地址
region: 'oss-cn-guangzhou',
//id
accessKeyId: 'LTAI5tQSs47izVy8DLVdwUU9',
//密钥
accessKeySecret: 'qHI7C3PaXYZySr84HTToviC71AYlFq',
//桶的名字
bucket: 'hanhaiimage',
endpoint: 'oss-cn-shenzhen.aliyuncs.com',
}
},
dict : {
course : {//申遗历程
title : '申遗历程',
api : 'queryArticleById',
},
Inheritance : {//遗产概况
title : '文化遗产',
api : 'querySpotById',
},
tell : {//遗产讲述
title : '遗产讲述',
collectType : 0,
subTitle : '讲解现场',
payType : 1,
screen : true,
roleId : 0,
showRoleLevel : true,
},
travel : {//达人同游
title : '达人同游',
collectType : 1,
subTitle : '同游现场',
payType : 2,
roleId : 1,
},
path : {//遗产路径
title : '遗产路径',
collectType : 2,
payType : 0,
},
follow : {//我要跟拍
title : '我要跟拍',
collectType : 3,
subTitle : '跟拍现场',
payType : 3,
roleId : 2,
},
experience : {//非遗体验
title : '非遗体验',
collectType : 4,
payType : 4,
api : 'queryExperienceById',
},
Study : {//我要研学
title : '我要研学',
collectType : 5,
payType : 5,
},
good : {//文创好物
title : '文创好物',
collectType : 6,
},
}
}
uni.$uv.setConfig({
// 修改$uv.config对象的属性
config: {
// 修改默认单位为rpx,相当于执行 uni.$uv.config.unit = 'rpx'
unit: 'rpx'
},
})
Vue.prototype.$config = utils.deepMergeObject(defaultConfig, config[type])
Vue.prototype.$api = api
export default Vue.prototype.$config