Skip to content
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

Taro.request 在支付宝小程序中, success和fail回调都会执行 #3535

Closed
zjj269170021 opened this issue Jun 25, 2019 · 4 comments
Closed
Labels
question Further information is requested

Comments

@zjj269170021
Copy link

问题描述
为支付宝小程序提供的native-api.js中有一段代码出错

复现步骤
[复现问题的步骤]

  1. 使用Taro.request
  2. success和fail回调都会被执行

系统信息

  • 报错平台 [alipay]

补充信息
问题原因
由于用了箭头函数,arguments为run方法中,而不是当前方法中
image

@taro-bot
Copy link

taro-bot bot commented Jun 25, 2019

欢迎提交 Issue~

如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏

如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。

Good luck and happy coding~

@Chen-jj
Copy link
Contributor

Chen-jj commented Jun 26, 2019

@zjj269170021 zjj269170021 reopened this Jun 26, 2019
@Chen-jj Chen-jj added answered question Further information is requested labels Jun 28, 2019
@taro-bot
Copy link

taro-bot bot commented Jun 28, 2019

Hello~

您的问题楼上已经有了确切的回答,如果没有更多的问题这个 issue 将在 15 天后被自动关闭。

如果您在这 15 天中更新更多信息自动关闭的流程会自动取消,如有其他问题也可以发起新的 Issue。

Good luck and happy coding~

@Chen-jj
Copy link
Contributor

Chen-jj commented Jun 28, 2019

@zjj269170021 你截图处的代码并没有问题啊,劫持 complete 以运行 run 函数来发起队列中下一个请求而已。对 success,fail 根本没有影响。也不存在 success 、fail 同时触发的问题。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants