From 4f60150d487b7c996c6898872587883acb8fcb7b Mon Sep 17 00:00:00 2001 From: weipengfei <2187978347@qq.com> Date: Sat, 29 Jul 2023 14:18:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=A1=A8=E5=8D=95=E6=A0=A1?= =?UTF-8?q?=E9=AA=8C=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- subpkg/newPersonnel/newPersonnel.vue | 33 ++++++++++++++-------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/subpkg/newPersonnel/newPersonnel.vue b/subpkg/newPersonnel/newPersonnel.vue index 6d13741..29414da 100644 --- a/subpkg/newPersonnel/newPersonnel.vue +++ b/subpkg/newPersonnel/newPersonnel.vue @@ -212,23 +212,22 @@ }, // 创建账号 addAcountNum() { - this.$refs.uForm.validate().then((e) => { - if (e) this.$refs.districtSelectorRef.validate().then(async (e) => { - if (e) { - uni.showLoading() - let res = await loginAdd({...this.formData, ...this.$refs.districtSelectorRef.formData}); - uni.hideLoading() - uni.showToast({ - icon: "none", - title: "添加成功", - success: () => { - setTimeout(() => { - uni.navigateBack() - }, 1000) - } - }) - } - }) + let flag = this.$refs.districtSelectorRef.validate(); + this.$refs.uForm.validate().then(async (e) => { + if(e&&flag){ + uni.showLoading() + let res = await loginAdd({...this.formData, ...this.$refs.districtSelectorRef.formData}); + uni.hideLoading() + uni.showToast({ + icon: "none", + title: "添加成功", + success: () => { + setTimeout(() => { + uni.navigateBack() + }, 1000) + } + }) + } }) }, // // 获取机型,[1-微信小程序 2-微信公众号 3-手机H5 4-电脑PC 5-苹果APP 6-安卓APP]