积分兑换
This commit is contained in:
@@ -63,8 +63,9 @@ export default {
|
||||
onLoad() {
|
||||
this.getList()
|
||||
this.getIntegral()
|
||||
uni.$on('reloadIntegral', () => {
|
||||
uni.$on('updateList', () => {
|
||||
this.getIntegral()
|
||||
this.getListInit()
|
||||
})
|
||||
},
|
||||
onShow() {
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user