From 3f22aa26b79afac60fe10282ccac40e36922275a Mon Sep 17 00:00:00 2001 From: modendeveloper Date: Thu, 23 Jan 2025 00:23:28 +0800 Subject: [PATCH] =?UTF-8?q?Fix=EF=BC=9A3150=20=E3=80=90=E5=95=86=E5=9F=8E?= =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E3=80=91=E7=89=B9=E8=89=B2=E5=BA=97?= =?UTF-8?q?=E9=93=BA=E3=80=81=E9=87=87=E8=B4=AD=E6=89=B9=E5=8F=91=E5=95=86?= =?UTF-8?q?=E5=85=A5=E9=A9=BB=E6=B5=81=E7=A8=8B=E6=9C=AA=E6=94=B9=E5=8F=98?= =?UTF-8?q?=E4=B8=BA=E5=85=88=E5=BC=B9=E5=87=BA=E5=85=A5=E9=A9=BB=E9=A1=BB?= =?UTF-8?q?=E7=9F=A5=E5=86=8D=E5=A1=AB=E5=86=99=E8=B5=84=E6=96=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg_join/views/wholesaler.vue | 48 +++++++++++++++++++---------------- 1 file changed, 26 insertions(+), 22 deletions(-) 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 } } }