this.setData不是一个功能?

小程序 文章 2022-04-13 10:00 402 0 全屏看文

AI助手支持GPT4.0

this.setData不是一个功能?this.setData is not a function?

this.setData不是一个功能?
 getUserProfile(e) {          // 推荐使用wx.getUserProfile获取用户信息,开发者每次通过该接口获取用户个人信息均需用户确认          // 开发者妥善保管用户快速填写的头像昵称,避免重复弹窗                  wx.getUserProfile({            desc: '用于完善会员资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写            success: (res) => {A              this.setData({                userInfo: res.userInfo,                hasUserInfo: true              })            }          })        },

Getuserprofile (E) {/ / it is recommended to use wx.getuserprofile to obtain the user's information. Every time a developer obtains the user's personal information through this interface, the user must confirm it. / / the developer should keep the avatar nickname quickly filled in by the user and avoid repeating the pop-up window {wx.getuserprofile( {desc: 'used to improve member information', / / declare the purpose of obtaining the user's personal information, which will be displayed in the pop-up window later. Please fill in {success: (RES) = > {a this. SetData ({userinfo: res.userinfo, hasuserinfo: true})}} carefully,

回答:

社区技术运营专员-horanzhou:

你好我这边复现不出来,,请具体描述问题出现的流程,并提供能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。

brave:

这个A干嘛的

Mr.Zhao:

如何复现

-EOF-

AI助手支持GPT4.0


国内超级便宜服务器

摸鱼人热门新闻聚合

钻级赞助商 我要加入

开发者在线工具

第三方支付技术请加QQ群

相关文章
request请求遇到http code码408?
发布小程序是不是还得懂代码才行呀?怎么操作?这些都下载吗?
通过在线调试工具调试OA 提交审批接口,结果总是返回 301025
如何将企业微信作为API接到第三方应用程序/网页上
onshow周期里面打印已经setData的数据,依然是原来的空值?
随便看看
基础库版本2.21.3,在IOS手机上打开体验版空白? 412
TypeError: Function("r","regeneratorRuntime = r")? 498
注册服务号提示“系统繁忙,请稍后重试”,试了N多次了!怎么办吖? 521
二维码一时可以一时不行? 374
获取用户基本信息不再输出昵称和头像,那么有没有新的方式可以获取呢? 461
frameset 提示不支持? 411
获取用户基本信息(UnionID机制)没有昵称? 792
微信支付申请特约商户时,出现商户名称与营业执照注册号不匹配,如何解决? 3595
微信搜一搜中出现的诋毁我个人的相关搜索词怎么处理? 515
微信关注后回调接口获取不到用户头像和昵称 1165