This commit is contained in:
shijingjing
2022-08-25 17:44:20 +08:00
parent aaf2b8b475
commit 2b006da12d

View File

@@ -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('提交失败')
})
}
})
},