|
@@ -196,19 +196,23 @@
|
|
|
},
|
|
},
|
|
|
// 登录
|
|
// 登录
|
|
|
onLogin: function() {
|
|
onLogin: function() {
|
|
|
-
|
|
|
|
|
- if (!this.checked || this.checked.length == 0) {
|
|
|
|
|
- this.$tip.toast('请阅读后勾选并同意《平台协议》及《隐私协议》政策');
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ let checkPhone = new RegExp(/^[1]([3-9])[0-9]{9}$/);
|
|
|
if (!this.phoneNo || this.phoneNo.length == 0) {
|
|
if (!this.phoneNo || this.phoneNo.length == 0) {
|
|
|
- this.$tip.toast('请填写手机号');
|
|
|
|
|
- return;
|
|
|
|
|
|
|
+ this.$tip.toast('请输入手机号');
|
|
|
|
|
+ return false
|
|
|
|
|
+ }
|
|
|
|
|
+ if (!checkPhone.test(this.phoneNo)) {
|
|
|
|
|
+ this.$tip.toast('请输入正确的手机号');
|
|
|
|
|
+ return false
|
|
|
}
|
|
}
|
|
|
if (!this.smsCode || this.smsCode.length == 0) {
|
|
if (!this.smsCode || this.smsCode.length == 0) {
|
|
|
this.$tip.toast('请填写验证码');
|
|
this.$tip.toast('请填写验证码');
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
+ if (!this.checked || this.checked.length == 0) {
|
|
|
|
|
+ this.$tip.toast('请阅读后勾选并同意《平台协议》及《隐私政策》');
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
let loginParams = {
|
|
let loginParams = {
|
|
|
phone: this.phoneNo,
|
|
phone: this.phoneNo,
|
|
|
code: this.smsCode,
|
|
code: this.smsCode,
|