获得过 0 次赞
回答过的问题获得 0 次赞
分享过的文章/案例获得 0 次赞
评论与回复获得 0 次赞
请问这么写对吗? // wxml <button bindgetuserinfo="wechatLogin" open-type="getUserInfo"> 登录测试 </button> // js Page({ wechatLogin() { wx.getUserProfile({ lang: 'zh_CN', success(res){ console.log(res) }, fail(res){ console.log(res) } }) } }) 为什么报错 {errMsg: "getUserProfile:fail can only be invoked by user TAP gesture."}
wx.getUserProfile接口完全开放了吗?console.log('wx.getUserProfile', wx.canIUse('wx.getUserProfile')) 开发者工具及真机返回值为false [图片] [图片]
2021-03-05