微信小程序getUserProfile并没有弹窗
时间: 2023-10-16 15:06:44 浏览: 284
在微信小程序中,原先的wx.getUserInfo接口已经不会弹出授权框了。为了解决这个问题,可以使用wx.getUserProfile接口来获取用户信息。注意,wx.getUserProfile只能使用catchtap或bindtap进行调用。据引用所述,微信小程序对wx.getUserInfo接口进行了调整,并且官方推荐使用wx.getUserProfile来解决弹窗的问题。因此,在你的代码中,应该将uni.getUserProfile改为wx.getUserProfile来获取用户信息。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [微信小程序实现登录授权弹窗getUserProfile()](https://blog.csdn.net/DameLillardd/article/details/124108016)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [关于微信小程序--授权弹窗](https://blog.csdn.net/dadati/article/details/124769828)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文