列表刷新

This commit is contained in:
liuye
2021-12-24 11:25:49 +08:00
parent 0aed20e272
commit 458e264db0
2 changed files with 10 additions and 2 deletions

View File

@@ -132,9 +132,12 @@ export default {
}) })
.then((res) => { .then((res) => {
if (res.code == 0) { if (res.code == 0) {
this.$u.toast('发布成功')
this.flag = false this.flag = false
uni.navigateTo({ url: `./AppMarryAndDie?indexTabs=1` }) this.$u.toast('发布成功')
uni.$emit('updateList')
setTimeout(() => {
uni.navigateBack()
}, 600)
} }
}) })
} else { } else {

View File

@@ -150,6 +150,11 @@ export default {
this.$dict.load('marriageType', 'modeType').then(() => { this.$dict.load('marriageType', 'modeType').then(() => {
this.getEchart() this.getEchart()
}) })
uni.$on('updateList', () => {
this.current = 1
this.getList()
this.getEchart()
})
}, },
mounted() { mounted() {
this.Echart = echarts.init(document.getElementById('yearStatistic')) this.Echart = echarts.init(document.getElementById('yearStatistic'))