删除无用组件
This commit is contained in:
+1
-10
@@ -4,7 +4,6 @@ import pcRouter from './pcRouter';
|
||||
import mobileRouter from './mobileRouter';
|
||||
import MobilePrivacyPolicy from '@/views/mobile/privacyPolicy/index.vue';
|
||||
import MobileSearch from '@/views/mobile/mobileSearch/index.vue';
|
||||
import Polymerization from '@/views/polymerization/index.vue';
|
||||
|
||||
const routes: RouteRecordRaw[] = [
|
||||
{
|
||||
@@ -121,14 +120,6 @@ const routes: RouteRecordRaw[] = [
|
||||
title: '历史记录',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/polymerization',
|
||||
name: 'polymerization',
|
||||
component: Polymerization,
|
||||
meta: {
|
||||
title: '聚合下载',
|
||||
},
|
||||
},
|
||||
];
|
||||
const router = createRouter({
|
||||
history: createWebHistory(import.meta.env.BASE_URL),
|
||||
@@ -140,7 +131,7 @@ router.beforeEach((to, from, next) => {
|
||||
home && home.scrollTo(0, 0);
|
||||
document.title = '蛋黄派-' + to.meta.title;
|
||||
const token = localStorage.getItem('token');
|
||||
if (token || to.path === '/home' || to.path === '/polymerization') {
|
||||
if (token || to.path === '/home') {
|
||||
next();
|
||||
} else {
|
||||
next('/home');
|
||||
|
||||
Reference in New Issue
Block a user