fix: 加判断修复进不了页面问题

This commit is contained in:
yhui.yang 2017-07-27 20:54:58 +08:00
parent d048c34a3b
commit 62c669efb3
2 changed files with 2 additions and 2 deletions

View File

@ -27,7 +27,7 @@ export default (state = initialState, action) => {
loginState: (action.payload.data.errcode == 0)?MEMBER_STATUS:GUEST_STATUS, loginState: (action.payload.data.errcode == 0)?MEMBER_STATUS:GUEST_STATUS,
userName: action.payload.data.data ? action.payload.data.data.username : null, userName: action.payload.data.data ? action.payload.data.data.username : null,
uid: action.payload.data.data ? action.payload.data.data._id : null, uid: action.payload.data.data ? action.payload.data.data._id : null,
server_ip: action.payload.data.data.server_ip server_ip: action.payload.data.data ? action.payload.data.data.server_ip:null
}; };
} }
case LOGIN: { case LOGIN: {

View File

@ -27,7 +27,7 @@ export default (state = initialState, action) => {
loginState: (action.payload.data.errcode == 0)?MEMBER_STATUS:GUEST_STATUS, loginState: (action.payload.data.errcode == 0)?MEMBER_STATUS:GUEST_STATUS,
userName: action.payload.data.data ? action.payload.data.data.username : null, userName: action.payload.data.data ? action.payload.data.data.username : null,
uid: action.payload.data.data ? action.payload.data.data._id : null, uid: action.payload.data.data ? action.payload.data.data._id : null,
server_ip: action.payload.data.data.server_ip server_ip: action.payload.data.data ? action.payload.data.data.server_ip:null
}; };
} }
case LOGIN: { case LOGIN: {