|
|
@@ -74,7 +74,7 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="textarea-box" v-show="!addressShow">
|
|
|
- <textarea auto-height placeholder="请输入详细地址" v-model="addressDetail" name="detailAddress" maxlength="26"/>
|
|
|
+ <textarea auto-height placeholder="请输入详细地址" v-model="addressDetail" maxlength="26" @blur="testLength"/>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -141,6 +141,14 @@
|
|
|
this.txt = data.data.join('')
|
|
|
console.log(data.data.join(''))
|
|
|
},
|
|
|
+ testLength(){
|
|
|
+ if(this.addressDetail.length > 25){
|
|
|
+ uni.showToast({
|
|
|
+ title: '详细地址应为0-25个字符',
|
|
|
+ icon: 'none'
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
formSubmit(e) {
|
|
|
//将下列代码加入到对应的检查位置
|
|
|
//定义表单规则
|
|
|
@@ -150,12 +158,6 @@
|
|
|
checkType: "notnull",
|
|
|
errorMsg: "姓名不能为空"
|
|
|
},
|
|
|
- {
|
|
|
- name: "detailAddress",
|
|
|
- checkType: "string",
|
|
|
- checkRule: "0,25",
|
|
|
- errorMsg: "详细地址应为0-25个字符"
|
|
|
- },
|
|
|
{
|
|
|
name: "dealerName",
|
|
|
checkType: "notnull",
|