This commit is contained in:
X1627315083
2024-01-16 10:40:36 +08:00
parent 84f2898d28
commit 44c26dcc12
3 changed files with 5 additions and 3 deletions

View File

@@ -38,7 +38,8 @@ async function isMurmur() {
})
.catch((res) => {
});
if (isSxis&&!token) {
if (isSxis) {
// if (isSxis&&!token) {
// if(isLogin != 'login'){
// return
// }

View File

@@ -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' });

View File

@@ -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()
}