fix: 修复代客下单积分使用类型切换引起的无法选择问题
This commit is contained in:
@@ -378,7 +378,7 @@ async function pointsInit() {
|
||||
if (!props.user.id || score.sel == -1) {
|
||||
return;
|
||||
}
|
||||
const orderAmount = currentpayMoney.value - pointsDiscountAmount.value;
|
||||
const orderAmount = currentpayMoney.value * 1 + pointsDiscountAmount.value * 1;
|
||||
const res = await PointsApi.calcOrderUsablePoints({
|
||||
shopUserId: props.user.id,
|
||||
orderAmount: orderAmount <= 0 ? 0 : orderAmount,
|
||||
@@ -396,7 +396,7 @@ async function pointsInit() {
|
||||
async function pointsToMoney() {
|
||||
const res = await PointsApi.calcPointsToMoney({
|
||||
shopUserId: props.user.id,
|
||||
orderAmount: currentpayMoney.value - pointsDiscountAmount.value,
|
||||
orderAmount: currentpayMoney.value * 1 + pointsDiscountAmount.value * 1,
|
||||
points: usePointsNumber.value,
|
||||
});
|
||||
pointsDiscountAmount.value = res;
|
||||
@@ -426,12 +426,9 @@ watch(
|
||||
() => score.sel,
|
||||
(newval) => {
|
||||
console.log(newval);
|
||||
if (newval == -1) {
|
||||
usePointsNumber.value = 0;
|
||||
pointsDiscountAmount.value = 0;
|
||||
} else {
|
||||
pointsInit();
|
||||
}
|
||||
usePointsNumber.value = 0;
|
||||
pointsDiscountAmount.value = 0;
|
||||
pointsInit();
|
||||
}
|
||||
);
|
||||
function canUsePayType(item) {
|
||||
|
||||
Reference in New Issue
Block a user