|
|
|
@ -13,8 +13,12 @@ service.defaults.headers.post["Content-Type"] = "application/json;charset=UTF-8" |
|
|
|
|
|
|
|
|
|
// 请求拦截器
|
|
|
|
|
service.interceptors.request.use(config => { |
|
|
|
|
console.log(33, location.pathname) |
|
|
|
|
let token = localStorage.getItem(inIframe || router.app._route.path === '/theoryReview' ? 'review_token' : 'expert_token') |
|
|
|
|
if (token) config.headers.token = token |
|
|
|
|
// let token = localStorage.getItem(location.pathname !== '/reviewCenter/' ? 'review_token' : 'expert_token')
|
|
|
|
|
let token1 = localStorage.getItem('review_token') |
|
|
|
|
let token2 = localStorage.getItem('expert_token') |
|
|
|
|
if (token || token1 || token2) config.headers.token = token || token1 || token2 |
|
|
|
|
return config |
|
|
|
|
}, err => { |
|
|
|
|
Util.errorMsg({ |
|
|
|
|