From 2b006da12db9fd8706a9dc3f3457df1265844210 Mon Sep 17 00:00:00 2001 From: shijingjing <1789544664@qq.com> Date: Thu, 25 Aug 2022 17:44:20 +0800 Subject: [PATCH] =?UTF-8?q?=E9=98=B2=E6=8A=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/project/shandong10086/AppVillager/add.vue | 41 +++++++++---------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/src/project/shandong10086/AppVillager/add.vue b/src/project/shandong10086/AppVillager/add.vue index 3bc01fe..808f953 100644 --- a/src/project/shandong10086/AppVillager/add.vue +++ b/src/project/shandong10086/AppVillager/add.vue @@ -76,7 +76,6 @@ export default { methods: { submit() { if(this.flag) return - this.$refs.uForm.validate((valid) => { if (valid) { @@ -102,26 +101,26 @@ export default { this.flag = true this.$instance.post(`/app/appvillagercircleinfo/addOrUpdate`, { - topic: this.forms.topic, - content: this.forms.content, - pictures: imgs || [], - createUserResidentId: this.user.id, - areaId: this.user.areaId, - gpsDesc: this.forms.gpsDesc, - lat: this.forms.lat, - lng: this.forms.lng, - id: this.id, - }).then((res) => { - if (res?.code == 0) { - this.flag = false - - this.$u.toast('提交成功') - uni.$emit('updateList') - setTimeout(() => { - uni.navigateBack() - }, 600) - } - }) + topic: this.forms.topic, + content: this.forms.content, + pictures: imgs || [], + createUserResidentId: this.user.id, + areaId: this.user.areaId, + gpsDesc: this.forms.gpsDesc, + lat: this.forms.lat, + lng: this.forms.lng, + id: this.id, + }).then((res) => { + uni.navigateBack() + this.flag = false + if (res?.code == 0) { + this.$u.toast('提交成功') + uni.$emit('updateList') + } + }).catch((err) => { + this.flag = false + this.$u.toast('提交失败') + }) } }) },