Fix(店铺):字段值为null时,必填校验会报错导致无法提交数据
This commit is contained in:
@@ -330,36 +330,36 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
submit() {
|
submit() {
|
||||||
if (this.innApplyInfo.logo.length === 0) {
|
if (!this.innApplyInfo.logo) {
|
||||||
this.$dialog.error('请上传店铺LOGO图片')
|
this.$dialog.error('请上传店铺LOGO')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (this.innApplyInfo.cover.length === 0 && this.innApplyInfo.coverType === 1) {
|
if (!this.innApplyInfo.cover && this.innApplyInfo.coverType === 1) {
|
||||||
this.$dialog.error('请上传店铺封面图片')
|
this.$dialog.error('请上传店铺封面图片')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (this.innApplyInfo.coverVideo.length === 0 && this.innApplyInfo.coverType === 2) {
|
if (!this.innApplyInfo.coverVideo && this.innApplyInfo.coverType === 2) {
|
||||||
this.$dialog.error('请上传店铺封面视频')
|
this.$dialog.error('请上传店铺封面视频')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (this.innApplyInfo.ownerName.length === 0) {
|
if (!this.innApplyInfo.ownerName) {
|
||||||
this.$dialog.error('请输入店主名字')
|
this.$dialog.error('请输入店主名字')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (this.innApplyInfo.content.length === 0) {
|
if (!this.innApplyInfo.content) {
|
||||||
this.$dialog.error('请输入一句话介绍')
|
this.$dialog.error('请输入一句话介绍')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (this.innApplyInfo.desc.length === 0) {
|
// if (!this.innApplyInfo.desc) {
|
||||||
this.$dialog.error('请输入店铺简介')
|
// this.$dialog.error('请输入店铺简介')
|
||||||
return
|
// return
|
||||||
}
|
// }
|
||||||
if (this.uploadedFilesArray.length === 0) {
|
if (this.uploadedFilesArray.length === 0) {
|
||||||
this.$dialog.error('请上传至少一张店铺图片')
|
this.$dialog.error('请上传店铺图片')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (this.uploadedQualificationFilesArray.length === 0) {
|
if (this.uploadedQualificationFilesArray.length === 0) {
|
||||||
this.$dialog.error('请上传至少一张店铺资质图片')
|
this.$dialog.error('请上传资质图片')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// 深拷贝
|
// 深拷贝
|
||||||
|
|||||||
@@ -538,7 +538,7 @@ export default {
|
|||||||
},
|
},
|
||||||
getCode() {
|
getCode() {
|
||||||
if (this.reviewing) return
|
if (this.reviewing) return
|
||||||
if (this.form.phone.length === 0) {
|
if (!this.form.phone) {
|
||||||
uni.$u.toast('请输入手机号')
|
uni.$u.toast('请输入手机号')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -719,7 +719,7 @@ export default {
|
|||||||
},
|
},
|
||||||
getCode() {
|
getCode() {
|
||||||
if (this.reviewing) return
|
if (this.reviewing) return
|
||||||
if (this.formSupplier.phone.length === 0) {
|
if (!this.formSupplier.phone) {
|
||||||
uni.$u.toast('请输入手机号')
|
uni.$u.toast('请输入手机号')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -328,7 +328,7 @@ export default {
|
|||||||
},
|
},
|
||||||
getCode() {
|
getCode() {
|
||||||
if (this.reviewing) return
|
if (this.reviewing) return
|
||||||
if (this.form.phone.length === 0) {
|
if (!this.form.phone) {
|
||||||
uni.$u.toast('请输入手机号')
|
uni.$u.toast('请输入手机号')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user