jiaxing.zhou

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

- 删除了字典管理页面的路由配置
- 删除了日志管理页面的路由配置
- 更新了权限模块中菜单API的调用方式
- 替换了 getMenuListApi 为 menuApi.getMenuTree 方法
......@@ -99,24 +99,6 @@ const staticRoutes: RouteRecordRaw[] = [
}
},
{
path: 'dicts',
name: 'Dicts',
component: () => import('@/views/dicts/index.vue'),
meta: {
title: '字典管理',
requiresAuth: true
}
},
{
path: 'logs',
name: 'Logs',
component: () => import('@/views/logs/index.vue'),
meta: {
title: '日志管理',
requiresAuth: true
}
},
{
path: 'product',
name: 'Product',
component: () => import('@/views/product/index.vue'),
......
import { defineStore } from 'pinia'
import { ref } from 'vue'
import type { Menu, RouteRecord } from '@/types'
import { getMenuListApi } from '@/api/menu'
import { menuApi } from '@/api/menu'
import { useUserStore } from './user'
import router from '@/router'
......@@ -18,7 +18,7 @@ export const usePermissionStore = defineStore('permission', () => {
// 获取菜单列表
const getMenuList = async (): Promise<Menu[]> => {
try {
const response: Menu[] = await getMenuListApi()
const response = await menuApi.getMenuTree()
menuList.value = response
return response
} catch (error) {
......