Merge branch 'dev-3.7' of https://git.mesalab.cn/nezha/nezha-fronted into dev-3.7
This commit is contained in:
@@ -183,7 +183,6 @@ export default {
|
||||
this.$router.replace({ path: '/', query: {} }).catch(err => {})
|
||||
this.logoutSuccess()
|
||||
window.location.href = '/'
|
||||
// this.$router.push('/login')
|
||||
})
|
||||
},
|
||||
showPinDialog () {
|
||||
|
||||
@@ -103,11 +103,11 @@ axios.interceptors.response.use(
|
||||
return response
|
||||
}
|
||||
if (licenceErrorCode.indexOf(response.data.code) !== -1 && noJumpPath.indexOf(window.location.pathname) == -1) {
|
||||
sessionStorage.setItem('nz-previous-page', router.currentRoute.fullPath + '1')
|
||||
sessionStorage.setItem('nz-previous-page', router.currentRoute.fullPath)
|
||||
window.location.href = '/'
|
||||
} else if (response.status === 200) {
|
||||
if (accountErrorCode.indexOf(response.data.code) !== -1 && noJumpPath.indexOf(window.location.pathname) == -1) {
|
||||
sessionStorage.setItem('nz-previous-page', router.currentRoute.fullPath + '2')
|
||||
sessionStorage.setItem('nz-previous-page', router.currentRoute.fullPath)
|
||||
window.location.href = '/'
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -149,7 +149,7 @@ router.beforeEach((to, from, next) => {
|
||||
resolve()
|
||||
} else {
|
||||
localStorage.removeItem('nz-token')
|
||||
sessionStorage.setItem('nz-previous-page', to.fullPath + '5')
|
||||
sessionStorage.setItem('nz-previous-page', to.fullPath)
|
||||
next({ path: '/login' })
|
||||
}
|
||||
})
|
||||
@@ -180,7 +180,7 @@ router.beforeEach((to, from, next) => {
|
||||
if (loginWhiteList.indexOf(to.path) !== -1) {
|
||||
next()
|
||||
} else {
|
||||
sessionStorage.setItem('nz-previous-page', to.fullPath + '6')
|
||||
sessionStorage.setItem('nz-previous-page', to.fullPath)
|
||||
next({ path: '/login' })
|
||||
}
|
||||
}
|
||||
|
||||
@@ -152,12 +152,13 @@ const user = {
|
||||
sessionStorage.removeItem('nz-previous-page')
|
||||
})
|
||||
} else {
|
||||
sessionStorage.removeItem('nz-previous-page')
|
||||
router.push({
|
||||
path: path[0],
|
||||
query: {
|
||||
t: +new Date()
|
||||
}
|
||||
}).then(() => {
|
||||
sessionStorage.removeItem('nz-previous-page')
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user