列表刷新

This commit is contained in:
花有清香月有阴
2021-12-24 11:52:02 +08:00
parent dc86715241
commit 1ba381eea0
4 changed files with 12 additions and 3 deletions

View File

@@ -175,7 +175,7 @@ export default {
.then((res) => { .then((res) => {
if (res.code == 0) { if (res.code == 0) {
this.flag = false this.flag = false
this.$u.toast('提交成功') this.$u.toast('发布成功')
uni.$emit('updateList') uni.$emit('updateList')
setTimeout(() => { setTimeout(() => {
uni.navigateBack() uni.navigateBack()

View File

@@ -72,8 +72,10 @@ export default {
if (res.code == 0) { if (res.code == 0) {
this.$u.toast('发布成功') this.$u.toast('发布成功')
this.flag = false this.flag = false
uni.navigateBack()
uni.$emit('refresh') uni.$emit('refresh')
setTimeout(() => {
uni.navigateBack()
}, 600)
} }
}) })
}, },

View File

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

View File

@@ -149,7 +149,10 @@ export default {
if (res.code == 0) { if (res.code == 0) {
this.$u.toast('保存成功') this.$u.toast('保存成功')
this.flag = false this.flag = false
uni.navigateTo({ url: `./AppWalkask` }) uni.$emit('updateList')
setTimeout(() => {
uni.navigateBack()
}, 600)
} }
}) })
} else { } else {