diff --git a/ecom-dmb-frontend/apps/web-antd/src/layouts/basic.vue b/ecom-dmb-frontend/apps/web-antd/src/layouts/basic.vue index bd168e6c..626d983e 100644 --- a/ecom-dmb-frontend/apps/web-antd/src/layouts/basic.vue +++ b/ecom-dmb-frontend/apps/web-antd/src/layouts/basic.vue @@ -16,7 +16,7 @@ import { } from '@vben/layouts'; import { preferences } from '@vben/preferences'; import { useAccessStore, useUserStore } from '@vben/stores'; -import { openWindow } from '@vben/utils'; +import { openWindow, navigateTo } from '@vben/utils'; import ImportTaskButton from '#/components/ImportTaskButton.vue'; import SwitchAccountModal from '#/components/SwitchAccountModal.vue'; @@ -74,10 +74,21 @@ const switchAccountModalRef = ref(); // 切换账户图标 const SwitchAccountIcon = createIconifyIcon('lucide:arrow-left-right'); +// 用户图标 +const UserIcon = createIconifyIcon('lucide:user'); const menus = computed(() => { const menuItems = []; + // 个人信息 + menuItems.push({ + handler: () => { + navigateTo('/system/profile'); + }, + icon: UserIcon, + text: '个人信息', + }); + // 只有超级管理员才显示切换账户功能 if (accessStore.userRole === 'super') { menuItems.push({ diff --git a/ecom-dmb-frontend/apps/web-antd/src/router/routes/modules/system.ts b/ecom-dmb-frontend/apps/web-antd/src/router/routes/modules/system.ts index 7825f622..885b332f 100644 --- a/ecom-dmb-frontend/apps/web-antd/src/router/routes/modules/system.ts +++ b/ecom-dmb-frontend/apps/web-antd/src/router/routes/modules/system.ts @@ -19,6 +19,16 @@ const routes: RouteRecordRaw[] = [ title: '菜单管理', }, }, + { + name: 'PersonalProfile', + path: '/system/profile', + component: () => import('#/views/system/profile/index.vue'), + meta: { + icon: 'lucide:user', + title: '个人信息', + hideInMenu: true, + }, + }, ], }, ]; diff --git a/ecom-dmb-frontend/apps/web-antd/src/views/system/profile/index.vue b/ecom-dmb-frontend/apps/web-antd/src/views/system/profile/index.vue new file mode 100644 index 00000000..0e2fbf0f --- /dev/null +++ b/ecom-dmb-frontend/apps/web-antd/src/views/system/profile/index.vue @@ -0,0 +1,217 @@ + + +