|
@@ -41,9 +41,11 @@ axios.interceptors.response.use(res => {
|
|
|
if (res.data.code == "402") { //Token过期,需要登录
|
|
if (res.data.code == "402") { //Token过期,需要登录
|
|
|
const path = router.currentRoute.fullPath
|
|
const path = router.currentRoute.fullPath
|
|
|
//console.log('lougout+path', path);
|
|
//console.log('lougout+path', path);
|
|
|
- store.dispatch("user/logout").then(res => {
|
|
|
|
|
- router.push({ path: "/login?redirect=" + path});
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ if (path.indexOf('/login') == -1) {
|
|
|
|
|
+ store.dispatch("user/logout").then(res => {
|
|
|
|
|
+ router.push({ path: "/login?redirect=" + path});
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
if (res.data.msg) {
|
|
if (res.data.msg) {
|
|
|
return Promise.reject(res.data.msg)
|
|
return Promise.reject(res.data.msg)
|