We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
微信小程序
小程序基础库: 2.33.0 使用框架: React
<T = any, U = any>(option: Option<T, U>) => RequestTask
以上是文档中定义的request方法,返回一个RequestTask对象,但实际返回的是一个promise,微信小程序原生wx.request方法返回的RequestTask对象不一致,因此Taro.request的返回值无法使用RequestTask的api
基础库版本:2.33.0 "@tarojs/cli": "3.4.6", "@tarojs/components": "3.4.6", "@tarojs/react": "3.4.6", "@tarojs/runtime": "3.4.6", "@tarojs/taro": "3.4.6",
返回RequestTask对象
返回的是Promise对象
Taro CLI 3.4.6 environment info: System: OS: Windows 10 Binaries: Node: 16.17.0 - C:\Users\wooduan\AppData\Local\Volta\tools\image\node\16.17.0\node.EXE Yarn: 1.22.19 - C:\Users\wooduan\AppData\Local\Volta\tools\image\yarn\1.22.19\bin\yarn.CMD npm: 8.19.1 - C:\Users\wooduan\AppData\Local\Volta\tools\image\npm\8.19.1\bin\npm.CMD
The text was updated successfully, but these errors were encountered:
可以使用吧, taro 只是封装了一下,RequestTask的api 都可以用的
Sorry, something went wrong.
No branches or pull requests
相关平台
微信小程序
小程序基础库: 2.33.0
使用框架: React
复现步骤
<T = any, U = any>(option: Option<T, U>) => RequestTask
以上是文档中定义的request方法,返回一个RequestTask对象,但实际返回的是一个promise,微信小程序原生wx.request方法返回的RequestTask对象不一致,因此Taro.request的返回值无法使用RequestTask的api
基础库版本:2.33.0
"@tarojs/cli": "3.4.6",
"@tarojs/components": "3.4.6",
"@tarojs/react": "3.4.6",
"@tarojs/runtime": "3.4.6",
"@tarojs/taro": "3.4.6",
期望结果
返回RequestTask对象
实际结果
返回的是Promise对象
环境信息
The text was updated successfully, but these errors were encountered: