mirror of
https://github.com/YMFE/yapi.git
synced 2024-12-15 05:10:47 +08:00
fix: 修改登录errcode判断错误的bug
This commit is contained in:
parent
9a2c44f433
commit
198303e5bc
@ -9,7 +9,7 @@ const cookies = new Cookies();
|
||||
const loginActions = (data) => {
|
||||
return (dispatch) => {
|
||||
axios.post('/user/login', data).then((res) => {
|
||||
if (res.data.data.errcode === 0) {
|
||||
if (res.data.errcode === 0) {
|
||||
cookies.set(data.email, data.password);
|
||||
dispatch({
|
||||
type: LOGIN,
|
||||
@ -18,7 +18,7 @@ const loginActions = (data) => {
|
||||
}
|
||||
});
|
||||
} else {
|
||||
console.log('登录失败');
|
||||
console.log('登录失败,errcode不为0');
|
||||
}
|
||||
}).catch((err) => {
|
||||
console.log(err);
|
||||
|
Loading…
Reference in New Issue
Block a user