Commit ad5f5464 authored by 张伯涛's avatar 张伯涛

未登录敲/跳转到登录页,登陆了敲/跳转到第一个目录的第一个菜单

parent 4723d321
......@@ -55,7 +55,7 @@ router.beforeEach((to, from, next) => {
} else {
Message.error('用户无权限')
store.dispatch('FedLogOut').then(() => {
next({ path: '/' })
next({ path: '/login' })
// window.location.href = `${process.env.VUE_APP_LOGIN}?redirect=${to.fullPath}&reLocation=${process.env.VUE_APP_NQ}`
})
}
......@@ -63,7 +63,7 @@ router.beforeEach((to, from, next) => {
} else {
Message.error('用户无权限')
store.dispatch('FedLogOut').then(() => {
next({ path: '/' })
next({ path: '/login' })
// window.location.href = `${process.env.VUE_APP_LOGIN}?redirect=${to.fullPath}&reLocation=${process.env.VUE_APP_NQ}`
})
}
......@@ -71,7 +71,7 @@ router.beforeEach((to, from, next) => {
.catch(err => {
store.dispatch('FedLogOut').then(() => {
Message.error(err)
next({ path: '/' })
next({ path: '/login' })
// window.location.href = `${process.env.VUE_APP_LOGIN}?redirect=${to.fullPath}&reLocation=${process.env.VUE_APP_NQ}`
})
})
......@@ -100,7 +100,7 @@ router.beforeEach((to, from, next) => {
next()
} else {
// 临时跳转
next({ path: '/' })
next({ path: '/login' })
// next(`http://login.court.com/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页
// window.location.href = `${process.env.VUE_APP_LOGIN}?redirect=${to.fullPath}&reLocation=${process.env.VUE_APP_ZT}`
// next()
......
......@@ -33,11 +33,11 @@ import LayoutLogin from '@/layoutLogin'
* 基础页面,所有人可以访问
*/
export const constantRoutes = [
{
path: '/',
redirect: '/login',
hidden: true
},
// {
// path: '/',
// redirect: '/login',
// hidden: true
// },
{
path: '/login',
component: (resolve) => require(['@/views/login/login.vue'], resolve),
......
......@@ -92,7 +92,7 @@ export default {
if (res.code === 200) {
removeToken()
this.$router.push({
path: '/',
path: '/login',
query: this.$route.query
})
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment