商品列表监听事件
This commit is contained in:
@@ -41,9 +41,14 @@ export default {
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
},
|
||||
onLoad() {
|
||||
this.getListInit()
|
||||
},
|
||||
onShow() {
|
||||
document.title = "积分代兑换"
|
||||
this.getListInit()
|
||||
uni.$on('updateGoodsList', () => {
|
||||
this.getListInit()
|
||||
})
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
@@ -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')
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -105,6 +105,7 @@ export default {
|
||||
createUserId: this.userId
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
uni.$emit('updateGoodsList')
|
||||
this.toSuccess()
|
||||
}
|
||||
})
|
||||
|
||||
@@ -116,6 +116,9 @@ export default {
|
||||
this.$dict.load(['integralSGTypeText']).then(() => {
|
||||
this.getList()
|
||||
})
|
||||
uni.$on('updateGoodsList', () => {
|
||||
this.getListInit()
|
||||
})
|
||||
},
|
||||
onShow() {
|
||||
document.title = '积分代兑换'
|
||||
|
||||
@@ -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')
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -105,6 +105,7 @@ export default {
|
||||
createUserId: this.userId
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
uni.$emit('updateGoodsList')
|
||||
this.toSuccess()
|
||||
}
|
||||
})
|
||||
|
||||
@@ -110,16 +110,20 @@ export default {
|
||||
...mapState(['user']),
|
||||
},
|
||||
onLoad() {
|
||||
this.$dict.load(['integralSGTypeText'])
|
||||
this.$dict.load(['integralSGTypeText']).then(() => {
|
||||
this.getListInit()
|
||||
})
|
||||
},
|
||||
onShow() {
|
||||
document.title = '积分商城'
|
||||
this.$nextTick(() => {
|
||||
this.getAccount().then(() => {
|
||||
this.total = this.user.girdIntegral || 0
|
||||
this.getListInit()
|
||||
})
|
||||
})
|
||||
uni.$on('updateGoodsList', () => {
|
||||
this.getListInit()
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
...mapActions(['getAccount']),
|
||||
|
||||
@@ -114,6 +114,7 @@ export default {
|
||||
this.$http.post(`/app/appintegralsupermarketorder/cancelForGird?id=${item.id}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.getListInit()
|
||||
uni.$emit('updateGoodsList')
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -104,6 +104,7 @@ export default {
|
||||
quantity: this.goodsNum
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
uni.$emit('updateGoodsList')
|
||||
this.toSuccess()
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user