收藏
回答

个人主体小程序无法调用获取手机号的api么?

uni-app写的
<button class="btn" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber" v-else>授权登录</button>
getPhoneNumber(e) {
        console.log(e, 'e===')
        if (!e.detail.encryptedData) {
          return false;
        }
        getUserPhone({
          code: e.detail.code
        }).then((res) => {
          if (res.data.success) {
            uni.setStorageSync('userPhone', res.data.phoneNumber);
            this.getCode(res.data.phoneNumber);
          }
        });
      }
e打印出来的detail里边的errMsg提示"getPhoneNumber:fail no permission",appId是wx17dc560491c5f336
回答关注问题邀请回答
收藏

6 个回答

  • 那一抹微笑😊穿透阳光
    那一抹微笑😊穿透阳光
    2025-10-24

    个人的不支持

    2025-10-24
    有用
    回复
  • 启年
    启年
    2025-10-23

    个人主体用不了这个API

    2025-10-23
    有用
    回复
  • showms
    showms
    发表于小程序端
    2025-10-23

    个人主体不支持

    2025-10-23
    有用
    回复
  • Hlxuan.
    Hlxuan.
    2025-10-23

    目前是的,可参考文档说明:https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/getPhoneNumber.html

    2025-10-23
    有用
    回复
  • hello world
    hello world
    2025-10-23

    个人的不行

    2025-10-23
    有用
    回复
  • 智能回答 智能回答 本次回答由AI生成
    2025-10-23
    有用
    • Hlxuan.
      Hlxuan.
      2025-10-23
      回答与提问不符。
      2025-10-23
      回复
登录 后发表内容