|
@@ -13,7 +13,7 @@
|
|
<uni-easyinput v-model="form.phone" placeholder="请输入联系电话" maxlength="13"/>
|
|
<uni-easyinput v-model="form.phone" placeholder="请输入联系电话" maxlength="13"/>
|
|
</uni-forms-item>
|
|
</uni-forms-item>
|
|
<uni-forms-item label="证照信息" required name="path">
|
|
<uni-forms-item label="证照信息" required name="path">
|
|
- <upload :imgArr="imageList" name="path" v-model="form.path" :fileSize="1" :limit="3"
|
|
|
|
|
|
+ <upload :imgArr="imageList" name="path" v-model="form.path" :fileSize="1" :limit="2"
|
|
@updateImg="updateImg"></upload>
|
|
@updateImg="updateImg"></upload>
|
|
</uni-forms-item>
|
|
</uni-forms-item>
|
|
</uni-forms>
|
|
</uni-forms>
|
|
@@ -79,14 +79,22 @@
|
|
},
|
|
},
|
|
/** 提交按钮 */
|
|
/** 提交按钮 */
|
|
submitForm(e) {
|
|
submitForm(e) {
|
|
- this.$refs[e].validate().then(res => {
|
|
|
|
- appletAdd(this.form).then(res => {
|
|
|
|
- uni.navigateBack();
|
|
|
|
- })
|
|
|
|
- }).catch(err => {
|
|
|
|
- console.log('err', err);
|
|
|
|
- })
|
|
|
|
|
|
+ this.$refs[e].validate().then(res => {
|
|
|
|
+ if(this.imageList.length!=2){
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: "证照信息照片为两张!",
|
|
|
|
+ icon: "none"
|
|
|
|
+ })
|
|
|
|
+ }else{
|
|
|
|
+ appletAdd(this.form).then(res => {
|
|
|
|
+ console.log("1111111111")
|
|
|
|
+ uni.navigateBack();
|
|
|
|
+ console.log("2222222222222")
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ })
|
|
},
|
|
},
|
|
|
|
+
|
|
updateImg(imgList) {
|
|
updateImg(imgList) {
|
|
this.imageList = imgList;
|
|
this.imageList = imgList;
|
|
this.form.path = this.imageList.join(',');
|
|
this.form.path = this.imageList.join(',');
|