Closed yangjiaqiao closed 3 years ago
我在执行后,需要重新执行effects ,这么去实现呢 *check({ payload }, { put, call, select }) { while (true) { yield call(delay, 1500); const qrCodeToken = yield select(state => state.auth.qrCodeToken); const data = yield call(checkQrCode, { token: qrCodeToken }); if (data.code === 200) { setToken(data.data.access_token); yield put({ type: 'authSuccess', payload: { token: data.data.access_token, }, }); history.push('/'); return false; } else if (data.code === 501) { return false; } } },
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
我在执行后,需要重新执行effects ,这么去实现呢 *check({ payload }, { put, call, select }) { while (true) { yield call(delay, 1500); const qrCodeToken = yield select(state => state.auth.qrCodeToken); const data = yield call(checkQrCode, { token: qrCodeToken }); if (data.code === 200) { setToken(data.data.access_token); yield put({ type: 'authSuccess', payload: { token: data.data.access_token, }, }); history.push('/'); return false; } else if (data.code === 501) { return false; } } },