wx.getUserProfile() 华为手机上面调用不起但是在开发者工具里面的真机测试又可以用?

发布于 6 年前作者 jiehao15024 次浏览最后编辑 6 年前来自 issues

wx.getStorage({ key: 'userInfo',

success (res) {

tools.showToast('成功',res)

that.userInfo = res.data;

that.getOpenId()

},

fail (err) {

tools.showToast('失败',err)

wx.getUserProfile({

desc: '正在获取', //不写不弹提示框

success: function (res) {

that.userInfo = res.userInfo;

wx.setStorage({ key: 'userInfo', data: res.userInfo });

that.getOpenId()

},

fail: function (err) {

console.log("获取失败: ", err)

}

})

}

});

2 回复
mawei
mawei2 楼4 年前

调不起这里提示什么信息