失败原因好像是因为在 getphonenumber 回调函数中调取了 wx.login 接口 解决:在其他地方获取 微信登录 code (我是定时器4分钟获取一次,使用后重新获取) <template> <view> 获取手机号码 </view> </template> exportdefault{ data() {return{ timer:null,//定时获取登录 code 以防过期jsCode:'',//获取到的 ...