Browse Source

update pc_chat

luke 6 năm trước cách đây
mục cha
commit
1d05281694
1 tập tin đã thay đổi với 7 bổ sung7 xóa
  1. 7 7
      pc_chat/src/components/leaveMsg.vue

+ 7 - 7
pc_chat/src/components/leaveMsg.vue

@@ -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)) {