fix: 修改登录errcode判断错误的bug

This commit is contained in:
wenbo.dong 2017-07-18 11:38:47 +08:00
parent 9a2c44f433
commit 198303e5bc

View File

@ -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);