积分兑换

This commit is contained in:
liuye
2022-11-29 10:16:52 +08:00
parent 0459c6e568
commit 56f5e0175c
2 changed files with 18 additions and 2 deletions

View File

@@ -63,8 +63,9 @@ export default {
onLoad() {
this.getList()
this.getIntegral()
uni.$on('reloadIntegral', () => {
uni.$on('updateList', () => {
this.getIntegral()
this.getListInit()
})
},
onShow() {

View File

@@ -28,7 +28,7 @@
<div class="label">支付积分</div>
<div class="value color-ff6900">-{{number*goodsInfo.merchandiseIntegral}}</div>
</div>
<div class="footer">
<div class="footer" @click="submit">
<div>提交订单</div>
</div>
</div>
@@ -73,6 +73,21 @@ export default {
}
})
},
submit() {
this.$http.post(`/app/appintegralmerchandiseorder/addOrUpdate`, {
merchandiseId: this.id,
merchandiseNumber: this.number,
remark: this.remark
}).then((res) => {
if (res.code == 0) {
this.$u.toast('提交成功')
uni.$emit('updateList')
setTimeout(() => {
uni.navigateBack({delta: 2})
}, 600)
}
})
},
},
}
</script>