-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
多个请求,有且返回401后,如何优雅地阻止后续请求? #1838
Comments
@sorrycc 大神帮帮忙 |
@ybning 你是想要 接口1 接口2 串行请求是吗?那你可以在第一个请求const ret = yield call(xxxx, params); |
猜测是并行。用const [data1,data2] = yield all[ call() , call() ] . if(data1.error || data2.error) { } |
这个很好解决 |
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. |
有这样一个场景:
订单新增页,需要请求:客户列表接口 和 商品列表接口,
然而token过期了,访问这个页面时,2个接口同时返回401,
如何优雅地处理:第1个接口返回401后,后续的接口不再请求。
The text was updated successfully, but these errors were encountered: