收藏
回答

2021.4.18 wx.getUserProfile pc端报错?

基础库版本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)


什么问题? 应该如何解决?

回答关注问题邀请回答
收藏

2 个回答

  • oyo
    oyo
    2021-04-18

    解决办法:通过wx.getSystemInfo获取当前运行平台,对windwos平台做判断,使用getUserinfo接口,获取用户信息。

    2021-04-18
    有用 1
    回复
  • 维她命系
    维她命系
    2021-04-18

    getUserProfile还不支持pc端小程序,pc端还是用getUserInfo

    2021-04-18
    有用
    回复 1
    • oyo
      oyo
      2021-04-18
      谢谢,已经处理了。
      2021-04-18
      1
      回复
登录 后发表内容
问题标签