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