防抖
This commit is contained in:
@@ -76,7 +76,6 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
submit() {
|
submit() {
|
||||||
if(this.flag) return
|
if(this.flag) return
|
||||||
|
|
||||||
this.$refs.uForm.validate((valid) => {
|
this.$refs.uForm.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
|
||||||
@@ -102,26 +101,26 @@ export default {
|
|||||||
|
|
||||||
this.flag = true
|
this.flag = true
|
||||||
this.$instance.post(`/app/appvillagercircleinfo/addOrUpdate`, {
|
this.$instance.post(`/app/appvillagercircleinfo/addOrUpdate`, {
|
||||||
topic: this.forms.topic,
|
topic: this.forms.topic,
|
||||||
content: this.forms.content,
|
content: this.forms.content,
|
||||||
pictures: imgs || [],
|
pictures: imgs || [],
|
||||||
createUserResidentId: this.user.id,
|
createUserResidentId: this.user.id,
|
||||||
areaId: this.user.areaId,
|
areaId: this.user.areaId,
|
||||||
gpsDesc: this.forms.gpsDesc,
|
gpsDesc: this.forms.gpsDesc,
|
||||||
lat: this.forms.lat,
|
lat: this.forms.lat,
|
||||||
lng: this.forms.lng,
|
lng: this.forms.lng,
|
||||||
id: this.id,
|
id: this.id,
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res?.code == 0) {
|
uni.navigateBack()
|
||||||
this.flag = false
|
this.flag = false
|
||||||
|
if (res?.code == 0) {
|
||||||
this.$u.toast('提交成功')
|
this.$u.toast('提交成功')
|
||||||
uni.$emit('updateList')
|
uni.$emit('updateList')
|
||||||
setTimeout(() => {
|
}
|
||||||
uni.navigateBack()
|
}).catch((err) => {
|
||||||
}, 600)
|
this.flag = false
|
||||||
}
|
this.$u.toast('提交失败')
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user