feat: 重构sidebar菜单块逻辑
This commit is contained in:
@ -7,12 +7,12 @@ import { appRoutes } from './routes';
|
||||
import { REDIRECT_MAIN, NOT_FOUND_ROUTE } from './routes/base';
|
||||
import NProgress from 'nprogress';
|
||||
import 'nprogress/nprogress.css';
|
||||
|
||||
import { MENU_GROUP_IDS } from './constants';
|
||||
import createRouteGuard from './guard';
|
||||
|
||||
NProgress.configure({ showSpinner: false }); // NProgress Configuration
|
||||
// console.log({ appRoutes });
|
||||
const router = createRouter({
|
||||
|
||||
export const router = createRouter({
|
||||
history: createWebHistory(import.meta.env.BASE_URL),
|
||||
routes: [
|
||||
{
|
||||
@ -30,6 +30,7 @@ const router = createRouter({
|
||||
meta: {
|
||||
hideSidebar: true,
|
||||
requiresAuth: true,
|
||||
id: MENU_GROUP_IDS.WORK_BENCH_ID,
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
import type { RouteRecordNormalized } from 'vue-router';
|
||||
import { REDIRECT_MAIN, NOT_FOUND_ROUTE } from './base';
|
||||
import { MENU_GROUP_IDS } from '@/router/constants';
|
||||
|
||||
const modules = import.meta.glob('./modules/*.ts', { eager: true });
|
||||
// const externalModules = import.meta.glob('./externalModules/*.ts', {
|
||||
@ -15,6 +17,6 @@ function formatModules(_modules: any, result: RouteRecordNormalized[]) {
|
||||
return result;
|
||||
}
|
||||
|
||||
export const appRoutes: RouteRecordNormalized[] = formatModules(modules, []);
|
||||
export const appRoutes: any[] = formatModules(modules, []);
|
||||
|
||||
// export const appExternalRoutes: RouteRecordNormalized[] = formatModules(externalModules, []);
|
||||
|
||||
@ -27,7 +27,6 @@ const COMPONENTS: AppRouteRecordRaw[] = [
|
||||
locale: '行业热门话题洞察',
|
||||
requiresAuth: true,
|
||||
roles: ['*'],
|
||||
menuId: 2,
|
||||
},
|
||||
component: () => import('@/views/components/dataEngine/hotTranslation.vue'),
|
||||
},
|
||||
@ -38,7 +37,6 @@ const COMPONENTS: AppRouteRecordRaw[] = [
|
||||
locale: '行业词云',
|
||||
requiresAuth: true,
|
||||
roles: ['*'],
|
||||
menuId: 3,
|
||||
},
|
||||
component: () => import('@/views/components/dataEngine/hotCloud.vue'),
|
||||
},
|
||||
@ -49,7 +47,6 @@ const COMPONENTS: AppRouteRecordRaw[] = [
|
||||
locale: '行业关键词动向',
|
||||
requiresAuth: true,
|
||||
roles: ['*'],
|
||||
menuId: 4,
|
||||
},
|
||||
component: () => import('@/views/components/dataEngine/keyWord.vue'),
|
||||
},
|
||||
@ -60,7 +57,6 @@ const COMPONENTS: AppRouteRecordRaw[] = [
|
||||
locale: '用户痛点观察',
|
||||
requiresAuth: true,
|
||||
roles: ['*'],
|
||||
menuId: 5,
|
||||
},
|
||||
component: () => import('@/views/components/dataEngine/userPainPoints.vue'),
|
||||
},
|
||||
@ -71,7 +67,6 @@ const COMPONENTS: AppRouteRecordRaw[] = [
|
||||
locale: '重点品牌动向',
|
||||
requiresAuth: true,
|
||||
roles: ['*'],
|
||||
menuId: 6,
|
||||
},
|
||||
component: () => import('@/views/components/dataEngine/keyBrandMovement.vue'),
|
||||
},
|
||||
@ -82,7 +77,6 @@ const COMPONENTS: AppRouteRecordRaw[] = [
|
||||
locale: '用户画像',
|
||||
requiresAuth: true,
|
||||
roles: ['*'],
|
||||
menuId: 7,
|
||||
},
|
||||
component: () => import('@/views/components/dataEngine/userPersona.vue'),
|
||||
},
|
||||
|
||||
@ -31,7 +31,6 @@ const COMPONENTS: AppRouteRecordRaw[] = [
|
||||
locale: '品牌信息',
|
||||
requiresAuth: true,
|
||||
roles: ['*'],
|
||||
menuId: 11,
|
||||
},
|
||||
component: () => import('@/views/property-marketing/brands/brand-materials/index.vue'),
|
||||
},
|
||||
@ -57,7 +56,6 @@ const COMPONENTS: AppRouteRecordRaw[] = [
|
||||
locale: '账号管理',
|
||||
requiresAuth: true,
|
||||
roles: ['*'],
|
||||
menuId: 12,
|
||||
},
|
||||
component: () => import('@/views/property-marketing/media-account/account-manage'),
|
||||
},
|
||||
@ -105,7 +103,6 @@ const COMPONENTS: AppRouteRecordRaw[] = [
|
||||
locale: '账户管理',
|
||||
requiresAuth: true,
|
||||
roles: ['*'],
|
||||
menuId: 13,
|
||||
},
|
||||
component: () => import('@/views/property-marketing/put-account/account-manage'),
|
||||
},
|
||||
@ -161,7 +158,6 @@ const COMPONENTS: AppRouteRecordRaw[] = [
|
||||
locale: '业务洞察报告',
|
||||
requiresAuth: true,
|
||||
roles: ['*'],
|
||||
menuId: 14,
|
||||
},
|
||||
component: () => import('@/views/property-marketing/intelligent-solution/businessAnalysisReport'),
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user