列表刷新

This commit is contained in:
liuye
2021-12-24 11:33:28 +08:00
parent 9a91da8ebc
commit 35800e1944
4 changed files with 18 additions and 4 deletions

View File

@@ -174,9 +174,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: `./AppResidentActivities` }) this.$u.toast('提交成功')
uni.$emit('updateList')
setTimeout(() => {
uni.navigateBack()
}, 600)
} }
}) })
} else { } else {

View File

@@ -79,6 +79,10 @@ export default {
this.$dict.load(['villageActivityStatus']).then(() => { this.$dict.load(['villageActivityStatus']).then(() => {
this.getList() this.getList()
}) })
uni.$on('updateList', () => {
this.current = 1
this.getList()
})
}, },
mounted() {}, mounted() {},
methods: { methods: {

View File

@@ -101,9 +101,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: `./AppUniMsg` }) this.$u.toast('提交成功')
uni.$emit('updateList')
setTimeout(() => {
uni.navigateBack()
}, 600)
} }
}) })
} else { } else {

View File

@@ -80,6 +80,10 @@ export default {
onLoad() { onLoad() {
uni.setNavigationBarTitle({ title: '小程序公告' }) uni.setNavigationBarTitle({ title: '小程序公告' })
this.getList() this.getList()
uni.$on('updateList', () => {
this.current = 1
this.getList()
})
}, },
onShow() {}, onShow() {},
methods: { methods: {