扫描小程序码分享
尝试了2.14.3,2.14.4,2.15.0都不行
开发者工具升级到1.05.2105170也不行,
1 个回答
加粗
标红
插入代码
插入链接
插入图片
上传视频
参考下公告:
https://developers.weixin.qq.com/community/develop/doc/000ecabcb642185cfdfb78fe056c01?highLine=wx.getUserProfile
可以使用接口进行判断:
console.log(wx.canIUse('getUserProfile'));
https://developers.weixin.qq.com/miniprogram/dev/api/base/wx.canIUse.html
你好,麻烦通过点击下方“反馈信息”按钮,提供出现问题的。
if (wx.canIUse('getUserProfile')) {
console.log('************10011');
wx.getUserProfile({
desc: '完善用户信息',
success: res => {
console.log(res);
// app.globalData.userInfo = res.userInfo;
// this.bindUserInfo(app.globalData.userInfo, app.globalData.unionId);
// this.setData({
// userInfo: res.userInfo,
// hasUserInfo: true
// })
},
fail: fail => {
console.log('*--', fail);
}
})
} else {
console.log('************10086');
关注后,可在微信内接收相应的重要提醒。
请使用微信扫描二维码关注 “微信开放社区” 公众号
参考下公告:
https://developers.weixin.qq.com/community/develop/doc/000ecabcb642185cfdfb78fe056c01?highLine=wx.getUserProfile
可以使用接口进行判断:
console.log(wx.canIUse('getUserProfile'));
https://developers.weixin.qq.com/miniprogram/dev/api/base/wx.canIUse.html
wx.canIUse(getUserProfile) => true
但是还是用不了
if (wx.canIUse('getUserProfile')) {
console.log('************10011');
wx.getUserProfile({
desc: '完善用户信息',
success: res => {
console.log(res);
// app.globalData.userInfo = res.userInfo;
// this.bindUserInfo(app.globalData.userInfo, app.globalData.unionId);
// this.setData({
// userInfo: res.userInfo,
// hasUserInfo: true
// })
},
fail: fail => {
console.log('*--', fail);
}
})
} else {
console.log('************10086');
}
https://developers.weixin.qq.com/miniprogram/dev/api/open-api/user-info/wx.getUserProfile.html#%E7%A4%BA%E4%BE%8B%E4%BB%A3%E7%A0%81