使用button组件获取不到code,得到的是encryptedData

小程序 文章 2022-01-10 15:40 328 0 全屏看文

AI助手支持GPT4.0

使用button组件获取不到code,得到的是encryptedDataI can't get the code using the button component, I get encryptedData

使用button组件获取不到code,得到的是encryptedData
框架类型 问题类型 API/组件名称 终端类型 微信版本 基础库版本
小程序 Bug <button open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber"></button> 工具 6.5.3 2.0.0

https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/phonenumber/phonenumber.getPhoneNumber.html

Framework type problem type API / component name terminal type wechat version basic library version applet bug & lt; button open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">& lt;/ button> Tools 6.5.3 2.0.0 https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/phonenumber/phonenumber.getPhoneNumber.html

回答:

社区技术运营专员-horanzhou:

请试一下真机调试

brave:

① 确认当前基础库版本是否为 2.21.2 及以上。

② 目前开发者工具稳定版未兼容此表现(近期应该会同步)。

③ 正常情况下,基础库 2.21.2 对应的是客户端版本号为 8.0.16,如果你的版本低于 8.0.16 并且是通过开发者工具向客户端推送的 2.21.2 基础库,大几率不会返回 code 参数,请手动更新微信版本。


目前请先用 开发版 或者 真机 进行调试。


一壶炊烟煮黄昏:

IDE 需要使用开发版本、真机需要使用8.0.16及以上版本才会返回code

-EOF-

AI助手支持GPT4.0