wx.getUserInfo已经不在支持,如何获取
必须用button才能获取用户信息,为了页面美观可以使用弹窗的方式提醒客户点击按钮,就可以了
使用 Button 的 open-type=“getUserInfo” 来获取用户信息。
https://developers.weixin.qq.com/miniprogram/dev/component/button.html