浏览代码

添加详细地址表单验证
添加经销商详细地址参数

306132416@qq.com 5 年之前
父节点
当前提交
d090f70526
共有 2 个文件被更改,包括 16 次插入2 次删除
  1. 7 1
      pages/index/customPage/index.vue
  2. 9 1
      pages/index/dealerPage/index.vue

+ 7 - 1
pages/index/customPage/index.vue

@@ -58,7 +58,7 @@
 							</picker> -->
 						</view>
 					<view class="textarea-box">
-					     <textarea  auto-height placeholder="请输入详细地址" v-model="addressDetail" maxlength="25" />
+					     <textarea  auto-height placeholder="请输入详细地址" v-model="addressDetail" maxlength="26" name="detailAddress" />
 					 </view>
 			</view>		
 		</view>
@@ -277,6 +277,12 @@
 			  			errorMsg: "姓名不能为空"
 			  		},
 					{
+						 name: "detailAddress", 
+						 checkType: "string", 
+						 checkRule: "0,25", 
+						 errorMsg: "详细地址应为0-25个字符" 
+					},
+					{
 						name: "trade",
 						checkType: "notnull",
 						errorMsg: "行业不能为空"

+ 9 - 1
pages/index/dealerPage/index.vue

@@ -74,7 +74,7 @@
 			   				</view>
 			   			</view>
 					<view class="textarea-box">
-					     <textarea  auto-height placeholder="请输入详细地址" maxlength="25" />
+					     <textarea  auto-height placeholder="请输入详细地址" v-model="addressDetail"  name="detailAddress" maxlength="26"/>
 					 </view>
 			</view>		
 		</view>
@@ -112,6 +112,7 @@
 				address: '',
 				addressObj:{},
 				loginObj:{},
+				addressDetail:'',
 			}
 		},
 		onLoad(option) {
@@ -149,6 +150,12 @@
 			  			checkType: "notnull",
 			  			errorMsg: "姓名不能为空"
 			  		},
+					{
+						 name: "detailAddress", 
+						 checkType: "string", 
+						 checkRule: "0,25", 
+						 errorMsg: "详细地址应为0-25个字符" 
+					},
 			  		{
 			  			name: "dealerName",
 			  			checkType: "notnull",
@@ -191,6 +198,7 @@
 						sex:that.userSex,//0-女 1-男
 						province:that.addressObj.province.id,//省份id
 						city:that.addressObj.city.id,//城市id
+						detailaddress:that.addressDetail,
 						jxs_name:params.dealerName,
 					},
 					success: res => {