-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
3.3.0-alpha.7 在h5环境不能使用jssdk中的方法 #9489
Comments
taro-bot2
bot
added
F-vue2
Framework - Vue 2
T-h5
Target - 编译到 H5
V-3
Version - 3.x
labels
Jun 9, 2021
3.2 可以吗? 可以断点进去看看,有没有成功调用 sdk。 taro/packages/taro-h5/src/api/system/index.js Lines 5 to 8 in ceb1a21
taro/packages/taro-h5/src/api/utils/index.js Lines 190 to 213 in ceb1a21
|
暂时没试3.2。但是,直接调用Taro.scanCode,在微信浏览器中会直接报下图内容,而我打印window.wx的内容是 |
sdk 的问题吧,自行断点看看了 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
相关平台
H5
浏览器版本: 微信浏览器
使用框架: Vue 2
复现步骤
使用3.3.0-alpha.7 编译为h5,在引入了jssdk后,并且签名成功,在微信浏览器中调用硬件的相关方法不会有任何反应,如:
Taro.scanCode()
Taro.getLocation()
......
(估计应该所有jssdk中的方法都会调用失败)
期望结果
在h5环境能够正常使用
实际结果
在普通浏览器中调用硬件的相关方法会提示”h5端仅在微信公众号中支持 API“
在微信浏览器中调用硬件的相关方法不会有任何反应
直接使用如:
wx.scanQRCode()
wx.getLocation()
就是正常的
环境信息
The text was updated successfully, but these errors were encountered: