商品列表监听事件

This commit is contained in:
liuye
2023-05-23 09:15:42 +08:00
parent cb1db05f00
commit 4f40ebce05
9 changed files with 21 additions and 3 deletions

View File

@@ -41,9 +41,14 @@ export default {
computed: {
...mapState(['user']),
},
onLoad() {
this.getListInit()
},
onShow() {
document.title = "积分代兑换"
this.getListInit()
uni.$on('updateGoodsList', () => {
this.getListInit()
})
},
methods: {

View File

@@ -123,6 +123,7 @@ export default {
this.$http.post(`/app/appintegralsupermarketorder/cancelForXCX?id=${item.id}`).then(res => {
if (res.code === 0) {
this.getListInit()
uni.$emit('updateGoodsList')
}
})
},

View File

@@ -105,6 +105,7 @@ export default {
createUserId: this.userId
}).then(res => {
if (res.code === 0) {
uni.$emit('updateGoodsList')
this.toSuccess()
}
})