浏览代码

车牌号去掉空格

twt 10 月之前
父节点
当前提交
006480e1ea
共有 3 个文件被更改,包括 15 次插入13 次删除
  1. 1 1
      pages/addjk/choice.vue
  2. 1 1
      pages/addjk/eadit.vue
  3. 13 11
      pages/wyCar/apply.vue

+ 1 - 1
pages/addjk/choice.vue

@@ -21,7 +21,7 @@
 			</view>
 		</view>
 		<view class="listBox">
-			<view class="listLine" v-for="(item,i) in list">
+			<view class="listLine" v-for="(item,i) in list" v-if="item.imgList.length>0">
 				<view class="listTitle">{{item.Name}}</view>
 				<view class="listSm">{{item.collectingComment}}</view>
 				<scroll-view scroll-x="true" class="scroll-X" >

+ 1 - 1
pages/addjk/eadit.vue

@@ -147,7 +147,7 @@
 					  <span>活动说明</span>
 				  </view>
 				  <view class="lineRight">
-					  <textarea placeholder-class="inputPlace" v-model="activityContent" placeholder="请输入" class="textsr"/> 
+					  <textarea maxlength="-1" placeholder-class="inputPlace" v-model="activityContent" placeholder="请输入" class="textsr"/> 
 				  </view>
 			</view>
 			<view class="line2">

+ 13 - 11
pages/wyCar/apply.vue

@@ -111,6 +111,18 @@
 		},
 		methods: {
 			submit(){
+				this.plateNumber = this.plateNumber.replace(/\s*/g,"");
+				var regex = /(^[安京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}(([A-HJ-NP-Z0-9]{5})|([A-HJ-NP-Z0-9]{6}))$)|(^[安京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-HJ-NP-Z0-9]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1}$)/u;
+				if (regex.test(this.plateNumber)) {
+				        
+				} else {
+				       uni.showToast({
+				       	title: '请输入正确车牌号',
+				       	icon: 'none',
+				       	duration: 3000
+				       });
+					   return false;
+				}
 				//this.convertToUpperCase(this.plateNumber)
 				if(!this.customerName){
 					uni.showToast({
@@ -132,17 +144,7 @@
 				     });
 				     return false;   
 				}
-				var regex = /(^[安京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}(([A-HJ-NP-Z0-9]{5})|([A-HJ-NP-Z0-9]{6}))$)|(^[安京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-HJ-NP-Z0-9]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1}$)/u;
-				if (regex.test(this.plateNumber)) {
-				        
-				} else {
-				       uni.showToast({
-				       	title: '请输入正确车牌号',
-				       	icon: 'none',
-				       	duration: 3000
-				       });
-					   return false;
-				}
+				
 				if(!this.mobilePhone){
 					uni.showToast({
 						title: '请输入手机号',