fix
This commit is contained in:
@@ -38,7 +38,8 @@ async function isMurmur() {
|
|||||||
})
|
})
|
||||||
.catch((res) => {
|
.catch((res) => {
|
||||||
});
|
});
|
||||||
if (isSxis&&!token) {
|
if (isSxis) {
|
||||||
|
// if (isSxis&&!token) {
|
||||||
// if(isLogin != 'login'){
|
// if(isLogin != 'login'){
|
||||||
// return
|
// return
|
||||||
// }
|
// }
|
||||||
|
|||||||
@@ -94,8 +94,9 @@ router.beforeEach((to, from, next) => {
|
|||||||
//机房用户
|
//机房用户
|
||||||
let murmurStr:any = localStorage.getItem('murmurStr')
|
let murmurStr:any = localStorage.getItem('murmurStr')
|
||||||
let getIsMurmur:any = getCookie("isMurmur")
|
let getIsMurmur:any = getCookie("isMurmur")
|
||||||
|
let token = getCookie("token");
|
||||||
let isMurmur = JSON.parse(getIsMurmur)
|
let isMurmur = JSON.parse(getIsMurmur)
|
||||||
if(isMurmur&& murmurStr){
|
if(isMurmur&& murmurStr && token){
|
||||||
const toName = to.name === 'login';
|
const toName = to.name === 'login';
|
||||||
if (toName) {
|
if (toName) {
|
||||||
next({ name: 'home' });
|
next({ name: 'home' });
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ axios.interceptors.response.use((res) =>{
|
|||||||
}
|
}
|
||||||
|
|
||||||
}, function(error) {
|
}, function(error) {
|
||||||
if(error?.response?.status === 401&&router.currentRoute._value.name != 'setIdentification'){//如果是记录浏览器页面就不跳转login
|
if(error?.response?.status === 401 && router.currentRoute._value.name != 'setIdentification'){//如果是记录浏览器页面就不跳转login
|
||||||
router.replace('/login')
|
router.replace('/login')
|
||||||
return Promise.reject()
|
return Promise.reject()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user