const userInfoRes = await new Promise<any>((resolve, reject) => {
wx.getUserProfile({
provider,
desc: '用于完善会员资料',
success: resolve,
fail: reject
})
})
我在调用这个api测试时,我都没授权,他就直接获取我的登录结果wx原生登录结果:
{errMsg: "login:ok", code: "0fdfszfzsf"}
code: "0f3mkykykykykyO"
errMsg: "login:ok"
我想要有授权弹窗我应该怎么办,已经试过清除开发者工具缓存,仍然直接授权,基础库版本3.10.0

这个接口现在返回的都不是真实的用户信息了,还用它干嘛,现在都用昵称头像填写能力了https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/userProfile.html
wx.getUserProfile 接口有调整,目前已经不能获取用户微信头像和昵称,默认返回的是灰色头像和“微信用户”,也没有授权弹窗了(除了旧版本微信[基础库版本低于2.27.1]和接口调整生效期前发布的小程序版本外),参考公告:https://developers.weixin.qq.com/community/develop/doc/00022c683e8a80b29bed2142b56c01
当前如果有头像和昵称获取的需要,只能让用户自己填写:https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/userProfile.html