diff --git a/pkg_join/views/wholesaler.vue b/pkg_join/views/wholesaler.vue index 21c37ac..a1dc41e 100644 --- a/pkg_join/views/wholesaler.vue +++ b/pkg_join/views/wholesaler.vue @@ -306,7 +306,7 @@ export default { address: {}, qualificationArr: [], isAgree: false, - show: false, + show: true, notice: '', showRemove: false, applyType: null, @@ -436,9 +436,32 @@ export default { this.form.areaId = values.district.id }, onSubmit() { + if(!this.isAgree) { + this.show = true + return + } this.$refs.wholesalerForm.validate().then(res => { // 校验通过 - this.show = true + saveWholesaler(this.form).then(res => { + if (res.status === 200) { + uni.showToast({ + title: '您的入驻申请已提交成功,请耐心等待审核', + icon: 'none', + success: () => { + this.initInfo() + this.show = false + } + }) + } + }).catch(err => { + uni.showToast({ + title: err.msg, + icon: 'none', + success: () => { + this.show = false + } + }) + }) }).catch(errors => { // 校验失败 console.log(errors) @@ -464,26 +487,7 @@ export default { this.isAgree = event.detail.value.length > 0 }, save() { - saveWholesaler(this.form).then(res => { - if (res.status === 200) { - uni.showToast({ - title: '您的入驻申请已提交成功,请耐心等待审核', - icon: 'none', - success: () => { - this.initInfo() - this.show = false - } - }) - } - }).catch(err => { - uni.showToast({ - title: err.msg, - icon: 'none', - success: () => { - this.show = false - } - }) - }) + this.show = false } } }