mirror of
https://github.com/whyour/qinglong.git
synced 2026-07-17 01:14:50 +08:00
修复用户名密码修改,diff视图滚动
This commit is contained in:
@@ -18,7 +18,7 @@ const Login = () => {
|
||||
},
|
||||
})
|
||||
.then((data) => {
|
||||
if (data.err == 0) {
|
||||
if (data.code == 200) {
|
||||
localStorage.setItem(config.authKey, data.token);
|
||||
history.push('/cookie');
|
||||
} else {
|
||||
|
||||
@@ -29,22 +29,18 @@ const Password = () => {
|
||||
|
||||
const handleOk = (values: any) => {
|
||||
request
|
||||
.post(`${config.apiPrefix}auth?t=${Date.now()}`, {
|
||||
.post(`${config.apiPrefix}user?t=${Date.now()}`, {
|
||||
data: {
|
||||
username: values.username,
|
||||
password: values.password,
|
||||
},
|
||||
})
|
||||
.then((data) => {
|
||||
if (data.err == 0) {
|
||||
localStorage.setItem(config.authKey, 'true');
|
||||
} else {
|
||||
notification.open({
|
||||
message: data.msg,
|
||||
});
|
||||
}
|
||||
.then((data: any) => {
|
||||
notification.success({
|
||||
message: data.msg,
|
||||
});
|
||||
})
|
||||
.catch(function (error) {
|
||||
.catch((error: any) => {
|
||||
console.log(error);
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user