修复积分抵扣接口报错问题
This commit is contained in:
parent
67a892ac01
commit
dfe65e0ae6
|
|
@ -1407,7 +1407,7 @@ export default {
|
|||
minDeductionPoints: 0,
|
||||
maxUsablePoints: 0,
|
||||
usable: false,
|
||||
points: 0,
|
||||
value: 0,
|
||||
toMoney: 0,
|
||||
},
|
||||
//选中可用优惠券
|
||||
|
|
@ -1857,7 +1857,7 @@ export default {
|
|||
this.createOrder.discount = 1;
|
||||
}
|
||||
},
|
||||
"vipUser.id": async function (val) {
|
||||
"vipUser.id": function (val) {
|
||||
// if (!this.table.tableId) {
|
||||
// return;
|
||||
// }
|
||||
|
|
@ -1875,6 +1875,9 @@ export default {
|
|||
type: val === "" ? 1 : 0,
|
||||
}).then((res) => {
|
||||
this.createOrder.data.memberId = val.id;
|
||||
this.getCalcUsablePoints().then((res) => {
|
||||
this.pointsValueChange(this.points.value);
|
||||
});
|
||||
});
|
||||
},
|
||||
"prveOrder.list.length": function (val) {
|
||||
|
|
@ -1993,8 +1996,12 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
async getCalcUsablePoints() {
|
||||
const memberId= this.createOrder.data.memberId || this.vipUser.id
|
||||
if(!memberId){
|
||||
return
|
||||
}
|
||||
const pointsRes = await $calcUsablePoints({
|
||||
memberId: this.createOrder.data.memberId || this.vipUser.id,
|
||||
memberId:memberId,
|
||||
orderAmount: this.currentPayMoney.toFixed(2),
|
||||
});
|
||||
this.points.res = pointsRes;
|
||||
|
|
|
|||
Loading…
Reference in New Issue