const setAuth = () => (dispatch, getState) => {
const router = getState().getIn(['light', 'router']).toJS()
Api.light.testAuthSearch().then((res) => {
if (res.state === 1) {
const newRouter = formatAuthData({ router: router, authData: res.data })
console.log(newRouter)
dispatch({ type: 'SET_LIGHT_STATE', key: ['router'], value: newRouter })
}
})
}