|
|
@@ -22,7 +22,7 @@
|
|
|
<label for="">
|
|
|
<span>您的手机号</span>
|
|
|
</label>
|
|
|
- <el-input v-model="phone" placeholder="请输入手机号"
|
|
|
+ <el-input v-model="phone" @blur='sureinfor(1)' placeholder="请输入手机号"
|
|
|
style="paddiing:0 9px;"></el-input>
|
|
|
</div>
|
|
|
<div class="qq">
|
|
|
@@ -165,12 +165,12 @@
|
|
|
// 失去焦点时验证
|
|
|
sureinfor(type) {
|
|
|
if (type == 1) {
|
|
|
- // if (!/^1[34578]\d{9}$/.test(this.phone)) {
|
|
|
- // this.error = true;
|
|
|
- // this.phone = '';
|
|
|
- // } else {
|
|
|
- // this.error = false;
|
|
|
- // }
|
|
|
+ if (!/^1[34578]\d{9}$/.test(this.phone)) {
|
|
|
+ this.error = true;
|
|
|
+ this.phone = '';
|
|
|
+ } else {
|
|
|
+ this.error = false;
|
|
|
+ }
|
|
|
}
|
|
|
else if (type == 10) {
|
|
|
if (!/^([a-zA-Z]|[0-9])(\w|\-)+@[a-zA-Z0-9]+\.([a-zA-Z]{2,4})$/.test(this.eMail)) {
|