调整签约,调整统一接口模式增加App版本号

This commit is contained in:
唐明明
2023-03-09 11:35:26 +08:00
parent 478b70e9f7
commit a24fe7a84c
3 changed files with 8 additions and 9 deletions

View File

@@ -10,8 +10,8 @@ import router from '../router'
// 基础配置
const config = {
// apiUrl : 'https://douhuo.douhuofalv.com/api/',
apiUrl : 'https://api.douhuotest.douhuofalv.com/api/', //测试环境
apiUrl : 'https://douhuo.douhuofalv.com/api/',
// apiUrl : 'https://api.douhuotest.douhuofalv.com/api/', //测试环境
timeout : 60000
}
@@ -29,8 +29,9 @@ const request = (parameter, hideLoding = true) => {
}
// 注入header
config.header = {
'Accept': 'application/json',
'Authorization': store.getters.getToken || uni.getStorageSync('token')
'Accept' : 'application/json',
'Authorization' : store.getters.getToken || uni.getStorageSync('token'),
'Version' : plus.runtime.version
}
// 加载提示
if(!hideLoding) uni.showLoading({