Authored by lijing

使用有货币bug

... ... @@ -48,7 +48,7 @@ const yohoCoinCompute = ($orderCompute) => {
$yohoCoinData.yohoCoinMsg = '共' + $yohoCoinData.totalYohoCoinNum +
'有货币,满' + $orderCompute.yoho_coin_pay_rule.num_limit + '可用';
} else if ($yohoCoinData.useYohoCoin > 0 || $yohoCoinData.yohoCoin > 0) {
let yohoCoin = parseInt($yohoCoinData.useYohoCoin > 0 ? $yohoCoinData.useYohoCoin : $yohoCoinData.yohoCoin).toFixed(2);
let yohoCoin = parseInt($yohoCoinData.useYohoCoin > 0 ? $yohoCoinData.useYohoCoin : $yohoCoinData.yohoCoin, 10).toFixed(2);
$yohoCoinData.yohoCoinMsg = '可抵¥' + yohoCoin;
$yohoCoinData.yohoCoinClick = 1;
... ... @@ -82,12 +82,12 @@ const ticketsConfirm = (param) => {
color: val.color_name,
size: val.product_skn == SINGLE_TICKETS_SKN ? '' : val.size_name,
count: val.buy_number,
price: parseInt(val.last_price).toFixed(2)
price: parseInt(val.last_price, 10).toFixed(2)
});
resu.goods = bulid;
});
resu.cartPayData = result[0].data.shopping_cart_data.promotion_formula_list;
resu.price = parseInt(result[0].data.shopping_cart_data.last_order_amount).toFixed(2);
resu.price = parseInt(result[0].data.shopping_cart_data.last_order_amount, 10).toFixed(2);
resu.yohoCoinCompute = yohoCoinCompute(result[0].data.shopping_cart_data);
}
return resu;
... ... @@ -103,7 +103,7 @@ const submitTicket = (param) => {
product_sku: param.productSku,
buy_number: param.buyNumber,
mobile: param.mobile,
use_yoho_coin: 0,
use_yoho_coin: param.useYohoCoin,
qhy_union: ''
}, {
code: 200
... ...
... ... @@ -515,6 +515,11 @@ function ticketsConfirm() {
useYohoCoin: orderInfo('yohoCoin')
};
// 如果没有勾选选择有货币,不取cookie有货币值,直接置0
if (!$('.checkbox').hasClass('icon-cb-radio')) {
data.useYohoCoin = 0;
}
if (!$ticketsMobile.val()) {
tip.show('手机号必填');
return;
... ...