mirror of
https://github.com/whyour/qinglong.git
synced 2026-07-18 10:39:20 +08:00
添加退出登录功能
This commit is contained in:
@@ -9,6 +9,7 @@ import {
|
||||
auto as followSystemColorScheme,
|
||||
setFetchMethod,
|
||||
} from 'darkreader';
|
||||
import { history } from 'umi';
|
||||
|
||||
const optionsWithDisabled = [
|
||||
{ label: '亮色', value: 'light' },
|
||||
@@ -34,9 +35,8 @@ const Password = () => {
|
||||
},
|
||||
})
|
||||
.then((data: any) => {
|
||||
notification.success({
|
||||
message: data.msg,
|
||||
});
|
||||
localStorage.removeItem(config.authKey);
|
||||
history.push('/login');
|
||||
})
|
||||
.catch((error: any) => {
|
||||
console.log(error);
|
||||
|
||||
Reference in New Issue
Block a user