范鹏 5316f1f33c 1. 修改我的页面显示url
2. 添加全局缓存方法,所有缓存添加小程序版本前缀
2024-09-19 11:50:23 +08:00

43 lines
837 B
JavaScript

let version = '-'
let buildNumber = "-"
uni.getSystemInfo({
success: function (res) {
version = res.appVersion
buildNumber = res.appVersionCode
}
});
const DEV = {
name: 'dev',
baseUrl: 'https://dev.lock.star-lock.cn/api',
webviewBaseUrl: 'https://dev.lock.star-lock.cn',
version,
buildNumber
}
const PRE = {
name: 'pre',
baseUrl: 'https://pre.lock.star-lock.cn/api',
webviewBaseUrl: 'https://lock.xhjcn.ltd',
version,
buildNumber
}
const XHJ = {
name: 'xhj',
baseUrl: 'https://lock.xhjcn.ltd/api',
webviewBaseUrl: 'https://lock.xhjcn.ltd',
version,
buildNumber
}
const SKY = {
name: 'sky',
baseUrl: 'https://lock.skychip.top/api',
webviewBaseUrl: 'https://lock.skychip.top',
version,
buildNumber
}
// 更换环境的时候 切换导出就行
export default { DEV, PRE, XHJ, SKY }