Browse Source

feat: 退出清理cookie

qiji
nili 2 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> </head>
<body> <body>
<div id="root"></div> <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> </body>
</html> </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 { LogoutOutlined, SettingOutlined, UserOutlined } from '@ant-design/icons';
import { history, useModel } from '@umijs/max'; import { history, useModel } from '@umijs/max';
import { Spin } from 'antd'; import { Spin } from 'antd';
@ -43,7 +42,8 @@ export const AvatarDropdown: React.FC<GlobalHeaderRightProps> = ({ menu, childre
* 退 url * 退 url
*/ */
const loginOut = async () => { 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 { search, pathname } = window.location;
const urlParams = new URL(window.location.href).searchParams; const urlParams = new URL(window.location.href).searchParams;
/** 此方法会跳转到 redirect 参数所在的位置 */ /** 此方法会跳转到 redirect 参数所在的位置 */

Loading…
Cancel
Save