jiaxing.zhou

refactor(router): 移除未使用的路由配置

- 删除了字典管理页面的路由配置
- 删除了日志管理页面的路由配置
- 更新了权限模块中菜单API的调用方式
- 替换了 getMenuListApi 为 menuApi.getMenuTree 方法
...@@ -99,24 +99,6 @@ const staticRoutes: RouteRecordRaw[] = [ ...@@ -99,24 +99,6 @@ const staticRoutes: RouteRecordRaw[] = [
99 } 99 }
100 }, 100 },
101 { 101 {
102 - path: 'dicts',
103 - name: 'Dicts',
104 - component: () => import('@/views/dicts/index.vue'),
105 - meta: {
106 - title: '字典管理',
107 - requiresAuth: true
108 - }
109 - },
110 - {
111 - path: 'logs',
112 - name: 'Logs',
113 - component: () => import('@/views/logs/index.vue'),
114 - meta: {
115 - title: '日志管理',
116 - requiresAuth: true
117 - }
118 - },
119 - {
120 path: 'product', 102 path: 'product',
121 name: 'Product', 103 name: 'Product',
122 component: () => import('@/views/product/index.vue'), 104 component: () => import('@/views/product/index.vue'),
......
1 import { defineStore } from 'pinia' 1 import { defineStore } from 'pinia'
2 import { ref } from 'vue' 2 import { ref } from 'vue'
3 import type { Menu, RouteRecord } from '@/types' 3 import type { Menu, RouteRecord } from '@/types'
4 -import { getMenuListApi } from '@/api/menu' 4 +import { menuApi } from '@/api/menu'
5 import { useUserStore } from './user' 5 import { useUserStore } from './user'
6 import router from '@/router' 6 import router from '@/router'
7 7
...@@ -18,7 +18,7 @@ export const usePermissionStore = defineStore('permission', () => { ...@@ -18,7 +18,7 @@ export const usePermissionStore = defineStore('permission', () => {
18 // 获取菜单列表 18 // 获取菜单列表
19 const getMenuList = async (): Promise<Menu[]> => { 19 const getMenuList = async (): Promise<Menu[]> => {
20 try { 20 try {
21 - const response: Menu[] = await getMenuListApi() 21 + const response = await menuApi.getMenuTree()
22 menuList.value = response 22 menuList.value = response
23 return response 23 return response
24 } catch (error) { 24 } catch (error) {
......