Browse Source

核销添加 静默登录

master
Enzo 4 years ago
parent
commit
4036b634cf
  1. 17
      pages/verification/index.vue

17
pages/verification/index.vue

@ -22,6 +22,7 @@
}
},
onLoad(options) {
this.wxlogin();
this.userInfo = uni.getStorageSync('userinfo');
this.loadOptions = options.scene;
this.strVerfiy = this.loadOptions.slice(2,this.loadOptions.length);
@ -33,6 +34,22 @@
}
},
methods: {
wxlogin(){
return new Promise((resolve, rejecj) => {
uni.login({
complete: result => {
if(result.errMsg == 'login:ok'){
let code = result.code;
this.$http(this.API.API_WXLOGIN, { code }).then(res => {
console.log("获得用户信息", res);
uni.setStorageSync('userinfo', res.data);
resolve(res.data);
})
}
}
})
})
},
//
getPhoneNumber(event){
if(this.userInfo.mobile == '') {

Loading…
Cancel
Save