首次登录自动生成随机密码

This commit is contained in:
whyour
2021-03-22 23:41:26 +08:00
parent dada261987
commit d41eb582e4
4 changed files with 114 additions and 7 deletions
+6 -2
View File
@@ -18,11 +18,15 @@ const Login = () => {
},
})
.then((data) => {
if (data.code == 200) {
if (data.code === 200) {
localStorage.setItem(config.authKey, data.token);
history.push('/cookie');
} else if (data.code === 100) {
notification.warn({
message: data.msg,
});
} else {
notification.open({
notification.error({
message: data.msg,
});
}