소스 검색

修复审核资料-号码校验

Tang 3 년 전
부모
커밋
21c8336bc5
1개의 변경된 파일28개의 추가작업 그리고 20개의 파일을 삭제
  1. 28 20
      pages2/verify/input.vue

+ 28 - 20
pages2/verify/input.vue

@@ -250,9 +250,7 @@
 									canvas-id="handWriting"
 								></canvas>
 								<view v-else style="width:100%;height: 100%;position: relative;">
-									<view class="ctoples">
-										图片
-									</view>
+									<view class="ctoples">图片</view>
 									<image style="width:100%;height:100%;" :src="$method.splitImgHost(form[item.fieldKey])" mode=""></image>
 								</view>
 							</view>
@@ -348,7 +346,12 @@ export default {
 					},
 					{
 						validator: (rule, value, callback) => {
-							return this.$u.test.mobile(value);
+							var vartest = /^([0-9]{3,4}-)?[0-9]{7,8}$/;
+							if (this.$u.test.mobile(value) || vartest.test(value)) {
+								return true;
+							}else{
+								return false
+							}
 						},
 						message: '手机号码不正确',
 						trigger: ['change', 'blur']
@@ -397,7 +400,12 @@ export default {
 					},
 					{
 						validator: (rule, value, callback) => {
-							return this.$u.test.mobile(value);
+							var vartest = /^([0-9]{3,4}-)?[0-9]{7,8}$/;
+							if (this.$u.test.mobile(value) || vartest.test(value)) {
+								return true;
+							}else{
+								return false
+							}
 						},
 						message: '单位联系电话不正确',
 						trigger: ['change', 'blur']
@@ -597,10 +605,10 @@ export default {
 		},
 		async submits() {
 			var ast = this.listData.some(item => {
-				return item.fieldKey === 'commitment_electr_signature'
-			})
-			if(ast){
-			await this.subCanvas();
+				return item.fieldKey === 'commitment_electr_signature';
+			});
+			if (ast) {
+				await this.subCanvas();
 			}
 			this.openVerify = true;
 			this.resultForm(1);
@@ -815,17 +823,17 @@ page {
 }
 </style>
 <style scope>
-	.ctoples{
-		position: absolute;
-		top: 0;
-		left: 0;
-		padding: 2rpx 23rpx;
-		display: inline-block;
-		background-color: rgba(0,0,0,.4);
-		font-size: 28rpx;
-		color: #fff;
-		border-bottom-right-radius: 24rpx;
-	}
+.ctoples {
+	position: absolute;
+	top: 0;
+	left: 0;
+	padding: 2rpx 23rpx;
+	display: inline-block;
+	background-color: rgba(0, 0, 0, 0.4);
+	font-size: 28rpx;
+	color: #fff;
+	border-bottom-right-radius: 24rpx;
+}
 .handWriting {
 	width: 100%;
 	height: 100%;