同意 onGotUserInfo(e) { this.nickName=e.target.userInfo.nickName; wx.getImageInf..._wx.getimageinfo()失败">
赞
踩
<button open-type="getUserInfo" lang="zh_CN" @getuserinfo="onGotUserInfo">同意</button>
onGotUserInfo(e) { this.nickName=e.target.userInfo.nickName; wx.getImageInfo({ src: e.target.userInfo.avatarUrl, success: function (res) { wx.setStorageSync('myAvatarUrl',res.path); }, fail(err) { console.log(err,'失败'); } }) }, ```wx.getImageInfo获取头像失败, 原因:微信头像的域名不在downloadFile合法域名里 解决办法:将 (wx.qlogo.cn)添加到downloadFile合法域名
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。