this.setData不是一个功能?

小程序 文章 2022-04-13 10:00 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-