<button bindtap="onKeyLogin">授权登录</button>
onKeyLogin(e) {
console.log("触发授权事件")
wx.getUserProfile({
desc:'同意授权',//不写不弹提示框
success:function(resData){
console.log("授权成功")
},
fail:function(err){
console.log("授权失败")
}
})
华为手机调用wx.getUserProfile 报错Huawei mobile phone calls wx.getUserProfile and reports an error
华为手机调用wx.getUserProfile 报错框架类型 | 问题类型 | API/组件名称 | 终端类型 | 微信版本 | 基础库版本 |
---|---|---|---|---|---|
小程序 | Bug | wx.getUserProfile | 微信安卓客户端 | 8.0.1 | 2.11.2 |
<button bindtap="onKeyLogin">授权登录</button>
onKeyLogin(e) {
console.log("触发授权事件")
wx.getUserProfile({
desc:'同意授权',//不写不弹提示框
success:function(resData){
console.log("授权成功")
},
fail:function(err){
console.log("授权失败")
}
})
Framework type problem type API / component name terminal type wechat version basic library version applet bug wx.getUserProfile Wechat Android client 8.0.1 2.11.2 < button bindtap = "onkeylogin" > authorized login < / button > onkeylogin (E){ console.log (trigger authorization event) wx.getUserProfile ({desc: 'agree to authorize', //Don't write, don't play prompt box success:function (resData){ console.log ("authorization successful")}, fail:function (err){ console.log ("authorization failed")})
回答:
getUserProfile可以正式使用了,我都改了好几个项目发布了,使用getUserProfile要满足基础库的要求,开发工具也要在1.05.2103112以上的,我是没加canIUse这些判断,直接就改了。
可以直接判断 wx.getUserProfile 有的话 说明可以使用
大兄弟 ~ 这个要四月份哦 还没有全面上线