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

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

parent 4723d321
...@@ -55,7 +55,7 @@ router.beforeEach((to, from, next) => { ...@@ -55,7 +55,7 @@ router.beforeEach((to, from, next) => {
} else { } else {
Message.error('用户无权限') Message.error('用户无权限')
store.dispatch('FedLogOut').then(() => { 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}` // 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) => { ...@@ -63,7 +63,7 @@ router.beforeEach((to, from, next) => {
} else { } else {
Message.error('用户无权限') Message.error('用户无权限')
store.dispatch('FedLogOut').then(() => { 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}` // 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) => { ...@@ -71,7 +71,7 @@ router.beforeEach((to, from, next) => {
.catch(err => { .catch(err => {
store.dispatch('FedLogOut').then(() => { store.dispatch('FedLogOut').then(() => {
Message.error(err) 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}` // 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) => { ...@@ -100,7 +100,7 @@ router.beforeEach((to, from, next) => {
next() next()
} else { } else {
// 临时跳转 // 临时跳转
next({ path: '/' }) next({ path: '/login' })
// next(`http://login.court.com/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页 // 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}` // window.location.href = `${process.env.VUE_APP_LOGIN}?redirect=${to.fullPath}&reLocation=${process.env.VUE_APP_ZT}`
// next() // next()
......
...@@ -33,11 +33,11 @@ import LayoutLogin from '@/layoutLogin' ...@@ -33,11 +33,11 @@ import LayoutLogin from '@/layoutLogin'
* 基础页面,所有人可以访问 * 基础页面,所有人可以访问
*/ */
export const constantRoutes = [ export const constantRoutes = [
{ // {
path: '/', // path: '/',
redirect: '/login', // redirect: '/login',
hidden: true // hidden: true
}, // },
{ {
path: '/login', path: '/login',
component: (resolve) => require(['@/views/login/login.vue'], resolve), component: (resolve) => require(['@/views/login/login.vue'], resolve),
......
...@@ -92,7 +92,7 @@ export default { ...@@ -92,7 +92,7 @@ export default {
if (res.code === 200) { if (res.code === 200) {
removeToken() removeToken()
this.$router.push({ this.$router.push({
path: '/', path: '/login',
query: this.$route.query 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