无法弹窗授权,获取的名称《微信用户》 头像 无图 头像
代码直接帮我改一下
<button bindgetuserinfo="wxUserInfo" openType="getUserInfo" wx:if="{{getuser}}"
wxUserInfo: function(t) {
var a = t.detail.errMsg;
if ("getUserInfo:ok" == a) {
var e = t.detail.userInfo;
wx.setStorageSync("userInfo", e), this.wxInfo(wx.getStorageSync("userInfo")), this.setData({
getuser: 0,
userInfo: t.detail.userInfo
}), wx.showToast({
title: "授权成功,请继续游戏",
icon: "none",
duration: 2e3,
mask: !0
});
} else "getUserInfo:fail auth deny" == a && (this.setData({
getuser: 1
}), wx.showToast({
title: "授权后才能查看",
icon: "none",
duration: 2e3,
mask: !0
}));
},
有其他办法吗
改不了,微信屏蔽了获取头像的接口,希望可以帮助到你