在onload或者onshow函数中直接调用wx.getUserProfile()函数不起作用
是不是getuserprofile()必须手动操作执行,不能自动加载后执行
wx.getUserProfile(Object object) 是需要手动操作执行
根据官方文档描述,需要写在页面产生点击事件(例如 button 上 bindtap 的回调中)后才可调用
https://developers.weixin.qq.com/miniprogram/dev/api/open-api/user-info/wx.getUserProfile.html