修复部分bug和页面调整

This commit is contained in:
X1627315083
2024-04-15 16:09:33 +08:00
parent 31a6d05e31
commit 6d7a597876
18 changed files with 168 additions and 72 deletions

View File

@@ -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');
}