|
|
@@ -27,7 +27,7 @@ const routes = [
|
|
|
component: () => import('@/views/login/index.vue'),
|
|
|
},
|
|
|
{
|
|
|
- path: '/news',
|
|
|
+ path: '/home',
|
|
|
component: () => import('@/views/layout/index.vue'),
|
|
|
children: [
|
|
|
{
|
|
|
@@ -91,7 +91,8 @@ router.beforeEach((to, form, next) => {
|
|
|
if (to.meta.notLogin) {
|
|
|
if (to.path == '/login') {
|
|
|
Cookies.remove('token')
|
|
|
- permissionStore.updataPermissionList(null)
|
|
|
+ permissionStore.updataPermissionList([])
|
|
|
+ permissionStore.updataLoad(false)
|
|
|
}
|
|
|
next()
|
|
|
} else {
|
|
|
@@ -110,7 +111,7 @@ router.beforeEach((to, form, next) => {
|
|
|
.getPersonPermission()
|
|
|
.then((response) => {
|
|
|
if (permissionSign && !hasPermission.hasPermission(permissionSign)) {
|
|
|
- next({ path: '/news' })
|
|
|
+ next({ path: '/home' })
|
|
|
} else {
|
|
|
next()
|
|
|
}
|
|
|
@@ -120,7 +121,7 @@ router.beforeEach((to, form, next) => {
|
|
|
})
|
|
|
} else {
|
|
|
if (permissionSign && !hasPermission.hasPermission(permissionSign)) {
|
|
|
- next({ path: '/news' })
|
|
|
+ next({ path: '/home' })
|
|
|
} else {
|
|
|
next()
|
|
|
}
|