Browse Source

增加必填

zhengkaixin 2 năm trước cách đây
mục cha
commit
b50c4e2a4b
1 tập tin đã thay đổi với 15 bổ sung2 xóa
  1. 15 2
      pagesFinance/user/addOwnerInformation.vue

+ 15 - 2
pagesFinance/user/addOwnerInformation.vue

@@ -27,7 +27,7 @@
 			</view>
 			<view class="infos-item">
 				<view class="title">
-					用户姓名
+					车主姓名<text class="asterisk">*</text>
 				</view>
 				<view class="content">
 					
@@ -37,7 +37,7 @@
 			</view>
 			<view class="infos-item border-none">
 				<view class="title">
-					车牌号码
+					车牌号码<text class="asterisk">*</text>
 				</view>
 				<view class="content" @click="show=true">
 					
@@ -145,6 +145,19 @@
 					})
 					return  false
 				}
+			
+				if(!this.obj.userName){
+					uni.showToast({				
+						title: "请填写车主姓名"
+					})
+					return  false
+				}
+				if(!this.obj.carNum){
+					uni.showToast({				
+						title: "请填写车牌号码"
+					})
+					return  false
+				}
 				var checkPhoneResult = checkPhone(this.obj.phone);
 						
 				if (checkPhoneResult !== true) {