this.setData不是一个功能?

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

相关文章
小程序与服务器建立TCP连接,服务器域名一定要ICP备案吗?
小程序提示APPID不合法?
服务器端如何获取小程序端设置的全局变量?
云函数调用外部关系型数据库如何添加IP白名单
小程序 WebView 的 url 只要配了业务域名就可以随便跳么?
随便看看
公众号自定义菜单绑定小程序保存不了? 458
购买的域名,最近建站,发现域名被微信拦截?麻烦解除拦截 335
在视频号设置服务菜单打开小程序,小程序APPID与页面路径都是对的,但视频号打开却说页面不存在? 591
会做小程序但是不懂运营怎么办? 315
2.4 - 2 = 0.399999999 请问这样的情况下,怎样处理合适? 307
为什么小程序发布后不能获得自建服务器的后台数据? 441
初学者!点击取消按钮,变成已取消 ,按返回键退出页面再进去,又变成了未取消的状态? 389
大佬们救救孩子吧!怎么实现文章中跳转小程序、外链,不出现跳转弹窗提醒? 774
有没有可能在不自定义导航栏的情况下,实现首页按钮和返回按钮同时存在? 314
公众号如何获取手机号码 535