#
luxiaotao1123
2024-02-21 7d3040d4c742af5e13f7327e7397a0524c1ffdec
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 参数所在的位置 */
@@ -102,20 +106,20 @@
  const menuItems = [
    ...(menu
      ? [
          {
            key: 'center',
            icon: <UserOutlined />,
            label: '个人中心',
          },
          {
            key: 'settings',
            icon: <SettingOutlined />,
            label: '个人设置',
          },
          {
            type: 'divider' as const,
          },
        ]
        {
          key: 'center',
          icon: <UserOutlined />,
          label: '个人中心',
        },
        {
          key: 'settings',
          icon: <SettingOutlined />,
          label: '个人设置',
        },
        {
          type: 'divider' as const,
        },
      ]
      : []),
    {
      key: 'logout',