2.16.1版本库灰度中,wx.getUserProfile点击无效,低版本点击报错?
发布于 4 年前 作者 lzhao 5372 次浏览 来自 问答

2 回复

目前只有2.10.4、2.16.0及以上版本有这个api。做下兼容判断就好了。

用if(wx.getUserProfile)判断能不能用,根据文档示例代码做兼容https://developers.weixin.qq.com/miniprogram/dev/api/open-api/user-info/wx.getUserProfile.html

回到顶部