收藏
回答

getPhoneNumber报api scope is not declared code:112?

getPhoneNumber中报错

getPhoneNumber: fail api scope is not declared in the privacy agreement,errno:112

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

5 个回答

  • 🇪 🇱 🇸 🇪
    🇪 🇱 🇸 🇪
    2024-02-19
    getPhoneNumber(e){
        let _this = this;
        let getphone = e.target.dataset.getphone;
        let { encryptedData:encrypted_data,iv } = e.detail;
        wx.login({
          successfunction(res{
            let code = res.code;
            const option = {encrypted_data,code,iv,..._this.data.scene}
            _this.distribution_login(option,getphone);
          }
        })
      },
    
    2024-02-19
    有用
    回复 1
    • 🇪 🇱 🇸 🇪
      🇪 🇱 🇸 🇪
      2024-02-19
      给后端传的code 要用wx.login返回的
      2024-02-19
      回复
  • 那一抹微笑😊穿透阳光
    那一抹微笑😊穿透阳光
    2023-11-24

    隐私协议加一下

    2023-11-24
    有用
    回复
  • showms
    showms
    2023-11-23

    更新一下隐私协议

    2023-11-23
    有用
    回复
  • 正青春
    正青春
    2023-11-23

    mp后台 -> 设置 -> 服务内容声明 -> 用户隐私保护指引中声明收集该组件对应的隐私类型【收集你的手机号】,完善隐私协议,勾选对应的接口。审核后,过一个小时,重启开发工具试试

    2023-11-23
    有用
    回复
  • Hlxuan.
    Hlxuan.
    2023-11-23

    出现112报错是因为你的小程序使用到了获取手机号组件,但是没有在[mp后台 -> 设置 -> 服务内容声明 -> 用户隐私保护指引]中声明收集该组件对应的隐私类型【收集你的手机号】,建议尽快补充该隐私类型声明,待审核通过后,过一段时间再试。

    参考公告:https://mp.weixin.qq.com/s/Vvj5nOTywoj1KlF726XIkg

    2023-11-23
    有用
    回复
登录 后发表内容