In mpvue, wx.getSetting goes straight ahead and fail prints as: system internal error

problem description

wx.getSetting go straight in mpvue fail print as: system internal error;

related codes

/ / Please paste the code text below (do not replace the code with pictures)
< template >
< div class= "container" >

  <button open-type="getUserInfo" @getuserinfo="bindGetUserInfo" @click="getUserInfo1"></button>

< / div >
< / template >

< script >
export default {
data () {

return {
  canIUse: wx.canIUse("button.open-type.getUserInfo")
}

},
created () {

this.getSetting()

},
methods: {

  getSetting(){
    wx.getSetting({
      success: function(res){
        if (res.authSetting["scope.userInfo"]) {
          wx.getUserInfo({
            success: function(res) {
              console.log(res.userInfo)
              //
              console.log("")
            }
          })
        }else{
          console.log("")
        }
      },
      fail(er){
        console.log(er) 
      }
    })
},
getUserInfo1(){
  console.log("click")
  // API  false 
  // console.log(wx.canIUse("button.open-type.getUserInfo"))
  if(wx.canIUse("button.open-type.getUserInfo")){
    // 
  }else{
    console.log("")
  }
},
bindGetUserInfo(e) {
  if (e.mp.detail.rawData){
    //
    console.log("")
  } else {
    //
    console.log("")
  }
}

}
}
< / script >

< style scoped >
.userinfo {
display: flex;
flex-direction: column;
align-items: center;
}

.userinfo-avatar {
width: 128rpx;
height: 128rpx;
margin: 20rpx;
border-radius: 50%;
}

.userinfo-nickname {
color:-sharpaaa;
}

.usermotto {
margin-top: 150px;
}

.form-control {
display: block;
padding: 0 12px;
margin-bottom: 5px;
border: 1px solid-sharpccc;
}

.counter {
display: inline-block;
margin: 10px auto;
padding: 5px 10px;
color: blue;
border: 1px solid blue;
}
< / style >

Apr.15,2021
Menu