添加退出登录,菜单改为后端api
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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',
|
||||
);
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -9,5 +9,6 @@ export const overridesPreferences = defineOverridesPreferences({
|
||||
// overrides
|
||||
app: {
|
||||
name: import.meta.env.VITE_APP_TITLE,
|
||||
accessMode: 'backend', // 或 'frontend'
|
||||
},
|
||||
});
|
||||
|
||||
@@ -15,6 +15,7 @@ interface UserInfo extends BasicUserInfo {
|
||||
* accessToken
|
||||
*/
|
||||
token: string;
|
||||
roles: [];
|
||||
}
|
||||
|
||||
export type { UserInfo };
|
||||
|
||||
Reference in New Issue
Block a user