https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/getPhoneNumber.html
<view class="msgBox" wx:if="{{isShowPop != 200}}">
<view class="baidu">微信授权</view>
<view class="con">
<image lazy-load='true' src="https://www.hkptjxz.com/Public/xcx/logo.jpg" class="fl"></image>
<text class="bt">鸿坤悦山湖-更多优惠房源 申请获取以下权限:</text>
</view>
<view class="min"> <text class="yuan"></text> 获得你的公开信息(昵称、头像等)</view>
<view class="bnBox">
<view class="cancel" bindtap='closePop'>取消</view>
<button class="btn" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">确定</button>
</view>
</view>
getPhoneNumber (e) {
console.log(e.detail);
}
这个api已经用很久的了,非常大概率都不会有bug,怀疑你的逻辑写错了吧,可能有些手机逻辑运行在code失效前面,有些在后面,检测一下wx.login运行的位置