Merge branch 'feature/comment-0620-ch' into msb_test

fix/0701-ch
ch 2 years ago
commit 96def57eaa

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-17 17:42:32
* @LastEditors: ch
* @LastEditTime: 2022-06-29 16:22:37
* @LastEditTime: 2022-06-29 17:33:30
* @Description: 项目接口请求统一处理器返回一个需要token和不需要token的请求封装方法
*/
@ -108,14 +108,14 @@ MsbRequestTk.use('request', (option) => {
const token = $store.state.token;
option.header.uid = uuid;
if(!token && !config.headers.notVerifyToken){
if(!token && !option.headers.notVerifyToken){
// 登录状态处理没有token直接跳转至登录
uni.redirectTo({
url: '/login'
});
return Promise.reject({message:'要先登录才能操作哦~'});
}
delete config.headers.notVerifyToken
delete option.headers.notVerifyToken
option.header = {...option.header, Authorization:token};
if(option.header.repeat){

Loading…
Cancel
Save