修复部分bug和页面调整
This commit is contained in:
@@ -32,6 +32,7 @@ const routes: Array<RouteRecordRaw> = [
|
||||
path: '/home',
|
||||
name: 'home',
|
||||
component: _import('HomeMain'),
|
||||
meta:{keepAlive:true},
|
||||
children:[
|
||||
{
|
||||
path: "",
|
||||
@@ -41,7 +42,8 @@ const routes: Array<RouteRecordRaw> = [
|
||||
path:'homePage',
|
||||
name:'homePage',
|
||||
component: _import_custom('HomeView/HomeView.vue'),
|
||||
},{
|
||||
meta:{keepAlive:true},
|
||||
},{
|
||||
path:'library',
|
||||
name:'library',
|
||||
component: _import_custom('HomeView/library.vue'),
|
||||
@@ -155,7 +157,7 @@ router.beforeEach((to, from, next) => {
|
||||
if (isMurmur && murmurStr && token) {
|
||||
const toName = to.name === 'login';
|
||||
if (toName) {
|
||||
next({ name: 'home' });
|
||||
next({ name: 'homePage' });
|
||||
} else {
|
||||
next();
|
||||
}
|
||||
@@ -173,6 +175,7 @@ router.beforeEach((to, from, next) => {
|
||||
// 如果页面存在,正常跳转
|
||||
}
|
||||
} else {
|
||||
return
|
||||
// 如果页面不存在,可以跳转到404页面或者其他页面
|
||||
next('/404');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user