|
|
|
@ -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 == '') { |
|
|
|
|