export function get_account_auth(authKey) { const arg = { authKey };
return invoke("account_auth", arg) .then(resp => resp.data.token) .catch(onError); } ====== effects: { *getAuthKey({ payload }, { call, put, race, select, take }) { const resp = yield call(IndexApi.getAuthKey, {}); const token = yield call(Get_account_auth, resp.data.authKey);
yield put(StateAt.index({ authKey: resp.data.authKey, token })); }, },
|