积分兑换
This commit is contained in:
@@ -63,8 +63,9 @@ export default {
|
|||||||
onLoad() {
|
onLoad() {
|
||||||
this.getList()
|
this.getList()
|
||||||
this.getIntegral()
|
this.getIntegral()
|
||||||
uni.$on('reloadIntegral', () => {
|
uni.$on('updateList', () => {
|
||||||
this.getIntegral()
|
this.getIntegral()
|
||||||
|
this.getListInit()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
<div class="label">支付积分</div>
|
<div class="label">支付积分</div>
|
||||||
<div class="value color-ff6900">-{{number*goodsInfo.merchandiseIntegral}}</div>
|
<div class="value color-ff6900">-{{number*goodsInfo.merchandiseIntegral}}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="footer">
|
<div class="footer" @click="submit">
|
||||||
<div>提交订单</div>
|
<div>提交订单</div>
|
||||||
</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>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user