Browse Source

feat: 退出清理cookie

qiji
nili 5 months ago
parent
commit
568c77c874
  1. 2
      dist/index.html
  2. 2
      dist/umi.8824189e.js
  3. 4
      src/components/RightContent/AvatarDropdown.tsx

2
dist/index.html

@ -11,6 +11,6 @@
</head>
<body>
<div id="root"></div>
<script src="https://apks.bzgames.cn/matrix_fe/umi.a5d371d9.js"></script>
<script src="https://apks.bzgames.cn/matrix_fe/umi.8824189e.js"></script>
</body>
</html>

2
dist/umi.a5d371d9.js → dist/umi.8824189e.js

File diff suppressed because one or more lines are too long

4
src/components/RightContent/AvatarDropdown.tsx

@ -1,4 +1,3 @@
import { outLogin } from '@/services/ant-design-pro/api';
import { LogoutOutlined, SettingOutlined, UserOutlined } from '@ant-design/icons';
import { history, useModel } from '@umijs/max';
import { Spin } from 'antd';
@ -43,7 +42,8 @@ export const AvatarDropdown: React.FC<GlobalHeaderRightProps> = ({ menu, childre
* 退 url
*/
const loginOut = async () => {
const cookie = 'MatrixToken';
document.cookie = `${cookie}=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/`;
const { search, pathname } = window.location;
const urlParams = new URL(window.location.href).searchParams;
/** 此方法会跳转到 redirect 参数所在的位置 */

Loading…
Cancel
Save