获取用户手机号接口,提示:getPhoneNumber:fail no permission
//appid: wxf661f26b9b5a0d7e
//html
<button
open-type="getPhoneNumber"
[@getphonenumber](/user/getphonenumber)="getPhoneNumber"
[@click](/user/click)="jump"
>立即授权</button
>
//js
getPhoneNumber(e) {
wx.checkSession({
success (res) {
console.log(res,'登录状态')
console.log(e,'1111')
//session_key 未过期,并且在本生命周期一直有效
},
fail (err) {
console.log(err)
}
})
},