fix
This commit is contained in:
@@ -38,7 +38,8 @@ async function isMurmur() {
|
||||
})
|
||||
.catch((res) => {
|
||||
});
|
||||
if (isSxis&&!token) {
|
||||
if (isSxis) {
|
||||
// if (isSxis&&!token) {
|
||||
// if(isLogin != 'login'){
|
||||
// return
|
||||
// }
|
||||
|
||||
@@ -94,8 +94,9 @@ router.beforeEach((to, from, next) => {
|
||||
//机房用户
|
||||
let murmurStr:any = localStorage.getItem('murmurStr')
|
||||
let getIsMurmur:any = getCookie("isMurmur")
|
||||
let token = getCookie("token");
|
||||
let isMurmur = JSON.parse(getIsMurmur)
|
||||
if(isMurmur&& murmurStr){
|
||||
if(isMurmur&& murmurStr && token){
|
||||
const toName = to.name === 'login';
|
||||
if (toName) {
|
||||
next({ name: 'home' });
|
||||
|
||||
@@ -80,7 +80,7 @@ axios.interceptors.response.use((res) =>{
|
||||
}
|
||||
|
||||
}, 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')
|
||||
return Promise.reject()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user