|
@@ -120,6 +120,19 @@
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
+ countDown() {
|
|
|
|
|
+ const { count } = this;
|
|
|
|
|
+ if (count === 1) {
|
|
|
|
|
+ this.count = 60;
|
|
|
|
|
+ this.sending = false;
|
|
|
|
|
+ this.sendTime = "获取验证码";
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.count = count - 1;
|
|
|
|
|
+ this.sending = true;
|
|
|
|
|
+ this.sendTime = count - 1 + "秒后重新获取";
|
|
|
|
|
+ setTimeout(this.countDown.bind(this), 1000);
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
toLogin() {
|
|
toLogin() {
|
|
|
this.$queue.loginClear();
|
|
this.$queue.loginClear();
|
|
|
const {
|
|
const {
|
|
@@ -145,20 +158,23 @@
|
|
|
phone: phone,
|
|
phone: phone,
|
|
|
wxOpenId: this.$queue.getData("openId") || '',
|
|
wxOpenId: this.$queue.getData("openId") || '',
|
|
|
}
|
|
}
|
|
|
|
|
+ let url = ''
|
|
|
if (this.type == 1) {
|
|
if (this.type == 1) {
|
|
|
params = {
|
|
params = {
|
|
|
...params,
|
|
...params,
|
|
|
password: password,
|
|
password: password,
|
|
|
}
|
|
}
|
|
|
|
|
+ url = '/app/Login/loginApp'
|
|
|
}
|
|
}
|
|
|
if (this.type == 2) {
|
|
if (this.type == 2) {
|
|
|
params = {
|
|
params = {
|
|
|
...params,
|
|
...params,
|
|
|
msg: code
|
|
msg: code
|
|
|
}
|
|
}
|
|
|
|
|
+ url = '/app/Login/registerCode'
|
|
|
}
|
|
}
|
|
|
this.$Request
|
|
this.$Request
|
|
|
- .post("/app/Login/loginApp", params)
|
|
|
|
|
|
|
+ .post(url, params)
|
|
|
.then((res) => {
|
|
.then((res) => {
|
|
|
if (res.code == 0) {
|
|
if (res.code == 0) {
|
|
|
this.$queue.setData("userId", res.user.userId);
|
|
this.$queue.setData("userId", res.user.userId);
|