Commit 22d839c3 by zeyang

1.修复请求拦截器中参数拼接错误的问题

parent c07a9362
......@@ -3,7 +3,6 @@
const whiteApiList = [`${apiURL}/authorize/obtainToken`, `${apiURL}/authorize/checkToken`, `${cffpURL}/user/loginVerification`,`${apiURL}/appVersion/checkIsUpdate`,
`${cffpURL}/accessLog/accessLogSave`,`${cffpURL}/user/powerQuery`];
export const interceptor = () => {
uni.addInterceptor('request', {
// 请求拦截器
......@@ -13,9 +12,10 @@ export const interceptor = () => {
// uni.showLoading({
// title: '加载中...'
// });
// 当本地没有token,并且接口地址没在白名单内,需要重新获取token
if (!uni.getStorageSync('uni-token') && !whiteApiList.includes(args.url)) {
const params = {
ticket:'uni-app',
loginId:null
......@@ -71,6 +71,7 @@ export const interceptor = () => {
// uni.hideLoading()
},
complete() {
// uni.hideLoading()
}
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment