...
|
...
|
@@ -31,9 +31,11 @@ function yohoCoinCompute(orderCompute) { |
|
|
}
|
|
|
|
|
|
if (yohoCoinData.totalYohoCoinNum < 100) {
|
|
|
yohoCoinData.yohoCoinMsg = `共${yohoCoinData.totalYohoCoinNum}有货币,满${_.get(orderCompute, 'yoho_coin_pay_rule.num_limit', '100')}可用`;
|
|
|
yohoCoinData.yohoCoinMsg = `共${yohoCoinData.totalYohoCoinNum}有货币,满${
|
|
|
_.get(orderCompute, 'yoho_coin_pay_rule.num_limit', '100')}可用`;
|
|
|
} else if (yohoCoinData.useYohoCoin > 0 || yohoCoinData.yohoCoin > 0) {
|
|
|
yohoCoinData.yohoCoinMsg = '可抵¥' + (yohoCoinData.useYohoCoin > 0 ? yohoCoinData.useYohoCoin : yohoCoinData.yohoCoin);
|
|
|
yohoCoinData.yohoCoinMsg = '可抵¥' + (yohoCoinData.useYohoCoin > 0 ?
|
|
|
yohoCoinData.useYohoCoin : yohoCoinData.yohoCoin);
|
|
|
yohoCoinData.yohoCoinClick = 1;
|
|
|
} else {
|
|
|
yohoCoinData.yohoCoinMsg = '不满足有货币使用条件';
|
...
|
...
|
@@ -63,8 +65,10 @@ function tranformPayment(data, orderInfo, cartType, skuList, orderComputeData) { |
|
|
// orderComputeData 覆盖 data中对应的值
|
|
|
if (orderComputeData) {
|
|
|
orderComputeData.delivery_way && _.set(data, 'delivery_way', orderComputeData.delivery_way);
|
|
|
orderComputeData.promotion_formula_list && _.set(data, 'shopping_cart_data.promotion_formula_list', orderComputeData.promotion_formula_list);
|
|
|
orderComputeData.last_order_amount && _.set(data, 'shopping_cart_data.last_order_amount', orderComputeData.last_order_amount);
|
|
|
orderComputeData.promotion_formula_list &&
|
|
|
_.set(data, 'shopping_cart_data.promotion_formula_list', orderComputeData.promotion_formula_list);
|
|
|
orderComputeData.last_order_amount &&
|
|
|
_.set(data, 'shopping_cart_data.last_order_amount', orderComputeData.last_order_amount);
|
|
|
}
|
|
|
|
|
|
// delivery_address 中 提取信息
|
...
|
...
|
@@ -75,8 +79,10 @@ function tranformPayment(data, orderInfo, cartType, skuList, orderComputeData) { |
|
|
|
|
|
result.name = cookieAddress ? cookieAddress.consignee : addressData.consignee;
|
|
|
result.phoneNum = cookieAddress ? cookieAddress.mobile : addressData.mobile;
|
|
|
result.addressId = cookieAddress ? parseInt(crypto.decrypt(null, cookieAddress.address_id), 10) : addressData.address_id;
|
|
|
result.addressInfo = cookieAddress ? cookieAddress.address_info : [addressData.area, addressData.address].join(' ');
|
|
|
result.addressId = cookieAddress ?
|
|
|
parseInt(crypto.decrypt(null, cookieAddress.address_id), 10) : addressData.address_id;
|
|
|
result.addressInfo = cookieAddress ?
|
|
|
cookieAddress.address_info : [addressData.area, addressData.address].join(' ');
|
|
|
|
|
|
result.addressId = crypto.encryption(null, result.addressId + '');
|
|
|
isSunfengSupport = isSupport === 'Y';
|
...
|
...
|
@@ -271,7 +277,7 @@ function tranformPayment(data, orderInfo, cartType, skuList, orderComputeData) { |
|
|
result.cartPayData = cartData.promotion_formula_list;
|
|
|
result.num = cartData.goods_count;
|
|
|
result.goodsPrice = cartData.str_order_amount;
|
|
|
result.price = _.get(orderComputeData, 'last_order_amount', null) ?
|
|
|
result.price = _.isNumber(orderComputeData.last_order_amount) ?
|
|
|
orderComputeData.last_order_amount : cartData.last_order_amount;
|
|
|
|
|
|
if (cartData.gain_yoho_coin > 0) {
|
...
|
...
|
|