收藏
回答

返回示例countryCode类型写错了

https://developers.weixin.qq.com/miniprogram/dev/server/API/user-info/phone-number/api_getphonenumber.html

返回示例

{
  "errcode": 0,
  "errmsg": "ok",
  "phone_info": {
    "phoneNumber": "xxxxxx",
    "purePhoneNumber": "xxxxxx",
    "countryCode": 86,
    "watermark": {
      "timestamp": 1637744274,
      "appid": "xxxx"
    }
  }
}

countryCode实际返回的是"86" 字符串,并非数字,返回示例写错了

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

1 个回答

登录 后发表内容