mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-23 23:06:06 +08:00
修复登录退出接口路径
This commit is contained in:
parent
46aaeb4eac
commit
03c9f79549
|
@ -77,7 +77,7 @@ export default {
|
|||
writePathList: [configPath, scriptPath],
|
||||
bakPath,
|
||||
apiWhiteList: [
|
||||
'/api/login',
|
||||
'/api/user/login',
|
||||
'/open/auth/token',
|
||||
'/api/user/two-factor/login',
|
||||
'/api/system',
|
||||
|
|
|
@ -44,7 +44,7 @@ export default function (props: any) {
|
|||
const [collapsed, setCollapsed] = useState(false);
|
||||
|
||||
const logout = () => {
|
||||
request.post(`${config.apiPrefix}logout`).then(() => {
|
||||
request.post(`${config.apiPrefix}user/logout`).then(() => {
|
||||
localStorage.removeItem(config.authKey);
|
||||
history.push('/login');
|
||||
});
|
||||
|
|
|
@ -73,6 +73,10 @@ const Initialization = () => {
|
|||
setFields(_fields || []);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
localStorage.removeItem(config.authKey);
|
||||
}, []);
|
||||
|
||||
const steps = [
|
||||
{
|
||||
title: '欢迎使用',
|
||||
|
|
|
@ -31,7 +31,7 @@ const Login = () => {
|
|||
setTwoFactor(false);
|
||||
setWaitTime(null);
|
||||
request
|
||||
.post(`${config.apiPrefix}login`, {
|
||||
.post(`${config.apiPrefix}user/login`, {
|
||||
data: {
|
||||
username: values.username,
|
||||
password: values.password,
|
||||
|
|
|
@ -34,7 +34,7 @@ const errorHandler = function (error: any) {
|
|||
|
||||
const _request = extend({ timeout: 60000, params: { t: time }, errorHandler });
|
||||
const apiWhiteList = [
|
||||
'/api/login',
|
||||
'/api/user/login',
|
||||
'/open/auth/token',
|
||||
'/api/user/two-factor/login',
|
||||
'/api/system',
|
||||
|
|
Loading…
Reference in New Issue
Block a user