2.16.1版本库灰度中,wx.getUserProfile点击无效,低版本点击报错?

发布于 6 年前作者 lzhao5617 次浏览最后编辑 6 年前来自 ask

2 回复
wlei
wlei1 楼5 年前

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

shiwei
shiwei2 楼4 年前

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