基础库版本2.13.2 pc微信版本7.0.9.501
System: Unknown, WeChat 7.0.9.501
Network: wifi
UA: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36 MicroMessenger/7.0.9.501 NetType/WIFI MiniProgramEnv/Windows WindowsWechat
WeChatLib: 2.13.2 (2020.12.29 20:58:08)
调用wx.getUserProfile错误信息:
MiniProgramError
wx.getUserProfile is not a function
TypeError: wx.getUserProfile is not a function
at success (file://6.js/:3194:3390)
at A.function.i.(anonymous function) (file://5.js/:2:2914518)
at C (file://5.js/:2:121411)
at Object.success (file://5.js/:2:122236)
at Q (file://5.js/:2:1840113)
at d (file://5.js/:2:1840351)
at file://5.js/:2:1841790
at B (file://5.js/:2:77424)
at Object.g [as invoke] (file://5.js/:2:77555)
at Object.invoke (file://5.js/:2:254992)
什么问题? 应该如何解决?
解决办法:通过wx.getSystemInfo获取当前运行平台,对windwos平台做判断,使用getUserinfo接口,获取用户信息。
getUserProfile还不支持pc端小程序,pc端还是用getUserInfo