|
|
@@ -162,21 +162,27 @@ export default {
|
|
|
tools.error("手机号码格式错误")
|
|
|
return;
|
|
|
}
|
|
|
- commonSend({
|
|
|
- 'phone': this.accountData.phone,
|
|
|
- 'send_type': 'register'
|
|
|
- }).then((res) => {
|
|
|
- if (res.code === 1) {
|
|
|
- tools.success(res.msg);
|
|
|
- this.timeNum = 60;
|
|
|
- this.timer = setInterval(() => {
|
|
|
- this.timeNum--;
|
|
|
- if (this.timeNum <= 0) {
|
|
|
- clearInterval(this.timer);
|
|
|
+ uni.login({
|
|
|
+ provider: "weixin",
|
|
|
+ success: (loginRes) => {
|
|
|
+ commonSend({
|
|
|
+ 'phone': this.accountData.phone,
|
|
|
+ 'send_type': 'register',
|
|
|
+ 'wxCode':loginRes.code
|
|
|
+ }).then((res) => {
|
|
|
+ if (res.code === 1) {
|
|
|
+ tools.success(res.msg);
|
|
|
+ this.timeNum = 60;
|
|
|
+ this.timer = setInterval(() => {
|
|
|
+ this.timeNum--;
|
|
|
+ if (this.timeNum <= 0) {
|
|
|
+ clearInterval(this.timer);
|
|
|
+ }
|
|
|
+ }, 1000);
|
|
|
+ } else {
|
|
|
+ tools.error(res.msg);
|
|
|
}
|
|
|
- }, 1000);
|
|
|
- } else {
|
|
|
- tools.error(res.msg);
|
|
|
+ })
|
|
|
}
|
|
|
})
|
|
|
},
|