添加退出登录,菜单改为后端api

This commit is contained in:
xie7654
2025-07-01 20:43:50 +08:00
parent 7273ee275b
commit 61fb71133d
8 changed files with 58 additions and 23 deletions

View File

@@ -16,16 +16,16 @@
<link rel="icon" href="/favicon.ico" />
<script>
// 生产环境下注入百度统计
if (window._VBEN_ADMIN_PRO_APP_CONF_) {
var _hmt = _hmt || [];
(function () {
var hm = document.createElement('script');
hm.src =
'https://hm.baidu.com/hm.js?b38e689f40558f20a9a686d7f6f33edf';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(hm, s);
})();
}
// if (window._VBEN_ADMIN_PRO_APP_CONF_) {
// var _hmt = _hmt || [];
// (function () {
// var hm = document.createElement('script');
// hm.src =
// 'https://hm.baidu.com/hm.js?b38e689f40558f20a9a686d7f6f33edf';
// var s = document.getElementsByTagName('script')[0];
// s.parentNode.insertBefore(hm, s);
// })();
// }
</script>
</head>
<body>

View File

@@ -6,5 +6,7 @@ import { requestClient } from '#/api/request';
* 获取用户所有菜单
*/
export async function getAllMenusApi() {
return requestClient.get<RouteRecordStringComponent[]>('/menu/all');
return requestClient.get<RouteRecordStringComponent[]>(
'/system/menu/user_menu',
);
}

View File

@@ -128,7 +128,7 @@ watch(
<UserDropdown
:avatar
:menus
:text="userStore.userInfo?.realName"
:text="userStore.userInfo?.username"
:description="userStore.userInfo?.email"
tag-text="Pro"
@logout="handleLogout"

View File

@@ -9,5 +9,6 @@ export const overridesPreferences = defineOverridesPreferences({
// overrides
app: {
name: import.meta.env.VITE_APP_TITLE,
accessMode: 'backend', // 或 'frontend'
},
});