Commit 17edccd3 by LJM

bug

parent 6cd42ae0
Showing with 40 additions and 2 deletions
......@@ -113,6 +113,10 @@ export default {
this.index = e.detail.value;
this.formParams.intl_code = this.array[e.detail.value];
},
/**
* tab切换
* @param {Object} index
*/
tab(index) {
this.curr = index;
},
......@@ -126,6 +130,23 @@ export default {
* 手机验证码
*/
countdownChange() {
var reg = /^1(3[0-9]|4[01456879]|5[0-35-9]|6[2567]|7[0-8]|8[0-9]|9[0-35-9])\d{8}$/;
if (!this.formParams.account) {
uni.showToast({
title: '请输入手机号',
icon: 'none'
});
return false;
}
if (!reg.test(this.formParams.account)) {
uni.showToast({
title: '手机格式错误',
icon: 'none'
});
return false;
}
this.request(Api_Url + '/public/smsVerify', 'POST', { mobile: this.formParams.account, verify: this.formParams.verify, intl_code: this.formParams.intl_code }, true, true).then(res => {
if (res.err_code === 0) {
if (!this.code_disabled) {
......@@ -150,7 +171,7 @@ export default {
success: res => {
if (res.confirm) {
this.verify_flag = true;
this.refresh();
this.refresh(); //刷新验证码
} else if (res.cancel) {
}
}
......@@ -166,6 +187,23 @@ export default {
});
},
submit() {
var reg = /^1(3[0-9]|4[01456879]|5[0-35-9]|6[2567]|7[0-8]|8[0-9]|9[0-35-9])\d{8}$/;
if (!this.formParams.account) {
uni.showToast({
title: '请输入手机号',
icon: 'none'
});
return false;
}
if (!reg.test(this.formParams.account)) {
uni.showToast({
title: '手机格式错误',
icon: 'none'
});
return false;
}
this.request(Api_Url + '/login/action', 'POST', this.formParams, true, true).then(res => {
if (res.err_code === 0) {
this.verify_flag = false;
......@@ -189,7 +227,7 @@ export default {
success: res => {
if (res.confirm) {
this.verify_flag = true;
} else if (res.cancel) {
this.refresh(); //刷新验证码
}
}
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment