最近观察数据,适配调整后,发现线上总是会有些异常数据,用户的信息和头像都是默认的。
加上实时日志埋点,发现在基础库2.10.4以上,存在没有wx.getUserProfile方法的情况,跟文档的说的不一样呢?
搜集到的信息举例如下:(version是微信版本,sdkversion是基础库版本)
"version":"8.0.1","SDKVersion":"2.14.1","model":"GM1910","system":"Android 11","networkType":""
"version":"8.0.1","SDKVersion":"2.14.3","model":"MI 6","system":"Android 9","networkType":"wifi"
"version":"8.0.1","SDKVersion":"2.14.1","model":"T1","system":"Android 11","networkType":"wifi"
"version":"7.0.22","SDKVersion":"2.14.3","model":"S5","system":"Android 9.0","networkType":""
"version":"8.0.1","SDKVersion":"2.14.1","model":"HLK-AL00","system":"Android 9","networkType":"wifi"
什么情况?有其他同学遇到吗?
你好,有没有用这种写法呢
if(wx.getUserProfile){
this.setData({canIUseGetUserProfile:true})
}else{
// 搜集日志信息
});
<button wx:if="{{canIUseGetUserProfile}}" bindtap="getUserProfile">立即登录</button>
<button wx:else open-type="getUserInfo" bindgetuserinfo="toLogin">立即登录</button>