From 1b576a30a84b8b57f5b7d7a22424f9fc08d08516 Mon Sep 17 00:00:00 2001
From: xjj <xjj@123>
Date: 星期二, 27 二月 2024 13:03:56 +0800
Subject: [PATCH] #
---
zy-asrs-flow/src/components/RightContent/AvatarDropdown.tsx | 48 ++++++++++++++++++++++++++++++------------------
1 files changed, 30 insertions(+), 18 deletions(-)
diff --git a/zy-asrs-flow/src/components/RightContent/AvatarDropdown.tsx b/zy-asrs-flow/src/components/RightContent/AvatarDropdown.tsx
index 766a5d3..7dee603 100644
--- a/zy-asrs-flow/src/components/RightContent/AvatarDropdown.tsx
+++ b/zy-asrs-flow/src/components/RightContent/AvatarDropdown.tsx
@@ -8,6 +8,8 @@
import React, { useCallback } from 'react';
import { flushSync } from 'react-dom';
import HeaderDropdown from '../HeaderDropdown';
+import { setRemoteMenu } from '@/services/route'
+import { removeToken } from '@/utils/token-util'
export type GlobalHeaderRightProps = {
menu?: boolean;
@@ -43,7 +45,9 @@
* 閫�鍑虹櫥褰曪紝骞朵笖灏嗗綋鍓嶇殑 url 淇濆瓨
*/
const loginOut = async () => {
- await outLogin();
+ // await outLogin();
+ removeToken();
+ setRemoteMenu(null);
const { search, pathname } = window.location;
const urlParams = new URL(window.location.href).searchParams;
/** 姝ゆ柟娉曚細璺宠浆鍒� redirect 鍙傛暟鎵�鍦ㄧ殑浣嶇疆 */
@@ -100,23 +104,31 @@
}
const menuItems = [
- ...(menu
- ? [
- {
- key: 'center',
- icon: <UserOutlined />,
- label: '涓汉涓績',
- },
- {
- key: 'settings',
- icon: <SettingOutlined />,
- label: '涓汉璁剧疆',
- },
- {
- type: 'divider' as const,
- },
- ]
- : []),
+ // ...(menu
+ // ? [
+ // {
+ // key: 'center',
+ // icon: <UserOutlined />,
+ // label: '涓汉涓績',
+ // },
+ // {
+ // key: 'settings',
+ // icon: <SettingOutlined />,
+ // label: '涓汉璁剧疆',
+ // },
+ // {
+ // type: 'divider' as const,
+ // },
+ // ]
+ // : []),
+ {
+ key: 'settings',
+ icon: <SettingOutlined />,
+ label: '涓汉璁剧疆',
+ },
+ {
+ type: 'divider' as const,
+ },
{
key: 'logout',
icon: <LogoutOutlined />,
--
Gitblit v1.9.1