|
|
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://traveladmin.augcl.com/travel-api/api',
|
|
}
|
|
}
|
|
|
|
|
|
// 默认配置
|
|
const defaultConfig = {
|
|
mapKey : 'SNGBZ-K6AKJ-5X2FI-XYKCM-DEZXZ-FGBA3',
|
|
aliOss : {
|
|
url : 'https://tennis-oss.xzaiyp.top/',
|
|
config : {
|
|
//桶的地址
|
|
region: 'oss-cn-guangzhou',
|
|
//id
|
|
accessKeyId:'LTAI5tNycA46YTwm383dRvMV',
|
|
//密钥
|
|
accessKeySecret:'tAdbYQCmdur6jbZ8hjvgB7T1Z52mIG',
|
|
//桶的名字
|
|
bucket: 'zhuoqiu-image',
|
|
endpoint:'oss-cn-guangzhou.aliyuncs.com',
|
|
}
|
|
},
|
|
dict : {
|
|
course : {//申遗历程
|
|
title : '申遗历程',
|
|
},
|
|
Inheritance : {//遗产概况
|
|
title : '遗产概况',
|
|
|
|
},
|
|
tell : {//遗产讲述
|
|
title : '遗产讲述',
|
|
|
|
},
|
|
travel : {//达人同游
|
|
title : '达人同游',
|
|
|
|
},
|
|
path : {//遗产路径
|
|
title : '遗产路径',
|
|
|
|
},
|
|
follow : {//我要跟拍
|
|
title : '我要跟拍',
|
|
|
|
},
|
|
experience : {//非遗体验
|
|
title : '非遗体验',
|
|
|
|
},
|
|
Study : {//我要研学
|
|
title : '我要研学',
|
|
|
|
},
|
|
good : {//文创好物
|
|
title : '文创好物',
|
|
|
|
},
|
|
}
|
|
}
|
|
|
|
|
|
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
|