Commit 12fe4638 by 冷斌

fix bug

parent cfd1ba63
......@@ -13,7 +13,7 @@
<div class="form">
<div class="form_item">
<img src="__PUBLIC__/appapi/pay/img/zhanghao.png" >
<input v-model="account" class="inputStyle" type="text" @change="checked" placeholder="请输入手机号" />
<input v-model="account" class="inputStyle" type="text" @change="checkMobile" placeholder="请输入手机号" />
</div>
<div class="form_item">
......@@ -43,6 +43,30 @@
},
methods: {
//事件
checkMobile: function () {
if (this.account === '') {
layer.msg("手机号码不能为空");
return;
}
var reg_phone = /^(\d{5}|\d{6}|\d{7}|\d{8}|\d{9}|\d{10}|\d{11}|\d{12}|\d{13}|\d{14}|\d{15}|\d{16}|\d{17}|\d{18}|\d{19}|\d{20}|\d{21})$/;
if (!reg_phone.test(this.account)) {
layer.msg("请正确输入手机号码");
return;
}
this.checked();
},
checkPassword: function () {
if (this.password === '') {
layer.msg("密码不能为空");
return;
}
let len = this.password.length;
if (len < 8 || len > 16) {
layer.msg("请输入8~16位密码");
return;
}
this.checked();
},
checked(){
if(this.account && this.password){
this.is_Submit = 2
......
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 to comment