wx.getUserInfo返回问题? 和wx.openSetting问题....?

小程序 文章 2021-04-03 21:22 376 0 全屏看文

AI助手支持GPT4.0

wx.getUserInfo返回问题? 和wx.openSetting问题....?wx.getUserInfo returns a problem? and wx.openSetting problem...?

wx.getUserInfo返回问题? 和wx.openSetting问题....?

第一个关于wx.getUserInfo的问题:

代码如下:

但是返回的用户信息根本不是我的信息,如下 :

假如调整一下代码,如下 :

返回'未授权',如下 :

我之前是授权过的,可能后来又拒绝了,不知道这是怎么回事?

第二个问题:就是在button中用openSetting,没有用户信息授权选项,难道拒绝一次,终身不能再用了吗???,代码如下:

打开页面:

打开页面后,却没有再次获取用户信息授权的选项,怎么办??????:




The first one is about wx.getUserInfo Question: the code is as follows: but the returned user information is not my information at all, as follows: if you adjust the code, as follows: return 'unauthorized', as follows: I have authorized before, but may later refuse, I don't know what's the matter? Second question: open setting is used in button, and there is no user information authorization option, Can you refuse once and never use it again? The code is as follows: open the page: after opening the page, you don't have the option to obtain user information authorization again. What should you do

回答:

圣殿骑士:

需要提前更新成 getUserProfile

线上要到4月13日才会完全改成新的,但是现在的开发环境包括IDE工具已经更新成新的方案。

如果你当心到时候无法顺利切换,可以使用 wx.canIUse

这个方法来判断 getUserProfile 来做切换


张倩:2000000000
|G.XIAO|:

周知:getUserInfo 开发版 & 体验版 已对齐 getUserInfo 匿名表现,正式版将于 4月13日 正式对齐 getUserInfo 匿名表现。请开发者使用 getUserProfile 获取用户信息。


小程序登录、用户信息相关接口调整说明:https://developers.weixin.qq.com/community/develop/doc/000cacfa20ce88df04cb468bc52801


getUserProfile

-EOF-

AI助手支持GPT4.0


国内超级便宜服务器

摸鱼人热门新闻聚合

钻级赞助商 我要加入

开发者在线工具

第三方支付技术请加QQ群

相关文章
小程序内打开h5,h5回跳小程序 报错 ?
无法登陆后台怎么知道小程序管理员是谁?
该公众号提供的服务出现故障,请稍后再试,都过去几个小时了?
小程序做了登入页面但是被点击收藏后从收藏打开无需登入就直接使用了?
小程序商城可以上架电子茶吗?虽然与电子烟类似,但是原料是萃茶叶的精华的元素茶多酚
随便看看
微信公众号免300认证教程 5118
小程序已经上线,作为管理员无法在小程序数据助手查看数据? 4429
小程序广告组件通过审核,但是小程序内没有显示广告? 4401
企业微信通讯录账号被管理员误/恶意删除,怎么办? 8439
问题? 7656
如何快速搭建抽奖助手小程序(无需代码知识) 5224
许涛 大哥在吗, 要解冻小程序的时候提示信息主体不一致, 能帮忙看下吗? 6494
小程序搜一搜全称搜索不显示 麻烦解决一下!谢谢 5794
我的小程序广告收款主体是个体工商户,每个月邮寄两次发票很是麻烦,我年底的时候打包邮寄一次可以么? 5456
如何解决渲染层网络错误Failed to load media? 16703