微信 wx.getUserInfo 与 wx.getUserProfile 对比
1.功能上是 wx.getUserInfo 不在返回用户授权的头像昵称,只返回匿名信息,但 wx.getUserProfile 会返回用户授权的头像昵称。
2.wx.getUserInfo 授权成功后,当下次调用时,可以直接获取授权成功返回数据,不需要每次都需要用户确认,但 wx.getUserProfile 每次都需要用户确认允许后才能拿到用户信息
3.对于业务来说,可以通过 wx.getUserProfile 获取用户信息和昵称后,要存在自己服务器,不能像之前那样每次都通过 wx.getUserInfo 方式获取
wx.getUserProfile is not a function
把基础库改为如下版本即可: