Commit c07a9362 by zeyang

1.优化拦截器,路径自带参数,拼接参数后有两个?的问题

parent 362748d1
......@@ -29,9 +29,11 @@ export const interceptor = () => {
method: 'POST',
data: params,
success: (res) => {
if (res.statusCode === 200) {
uni.setStorageSync('uni-token', res.data['data']['token']);
window.location.href = window.location.href + '?' + 't_reload=' + new Date().getTime();
let isHas = window.location.href.indexOf('?')==-1?'?':'&';
window.location.href = window.location.href + isHas + 't_reload=' + new Date().getTime();
}
}
})
......
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