Showing
1 changed file
with
13 additions
and
7 deletions
@@ -31,9 +31,11 @@ function yohoCoinCompute(orderCompute) { | @@ -31,9 +31,11 @@ function yohoCoinCompute(orderCompute) { | ||
31 | } | 31 | } |
32 | 32 | ||
33 | if (yohoCoinData.totalYohoCoinNum < 100) { | 33 | if (yohoCoinData.totalYohoCoinNum < 100) { |
34 | - yohoCoinData.yohoCoinMsg = `共${yohoCoinData.totalYohoCoinNum}有货币,满${_.get(orderCompute, 'yoho_coin_pay_rule.num_limit', '100')}可用`; | 34 | + yohoCoinData.yohoCoinMsg = `共${yohoCoinData.totalYohoCoinNum}有货币,满${ |
35 | + _.get(orderCompute, 'yoho_coin_pay_rule.num_limit', '100')}可用`; | ||
35 | } else if (yohoCoinData.useYohoCoin > 0 || yohoCoinData.yohoCoin > 0) { | 36 | } else if (yohoCoinData.useYohoCoin > 0 || yohoCoinData.yohoCoin > 0) { |
36 | - yohoCoinData.yohoCoinMsg = '可抵¥' + (yohoCoinData.useYohoCoin > 0 ? yohoCoinData.useYohoCoin : yohoCoinData.yohoCoin); | 37 | + yohoCoinData.yohoCoinMsg = '可抵¥' + (yohoCoinData.useYohoCoin > 0 ? |
38 | + yohoCoinData.useYohoCoin : yohoCoinData.yohoCoin); | ||
37 | yohoCoinData.yohoCoinClick = 1; | 39 | yohoCoinData.yohoCoinClick = 1; |
38 | } else { | 40 | } else { |
39 | yohoCoinData.yohoCoinMsg = '不满足有货币使用条件'; | 41 | yohoCoinData.yohoCoinMsg = '不满足有货币使用条件'; |
@@ -63,8 +65,10 @@ function tranformPayment(data, orderInfo, cartType, skuList, orderComputeData) { | @@ -63,8 +65,10 @@ function tranformPayment(data, orderInfo, cartType, skuList, orderComputeData) { | ||
63 | // orderComputeData 覆盖 data中对应的值 | 65 | // orderComputeData 覆盖 data中对应的值 |
64 | if (orderComputeData) { | 66 | if (orderComputeData) { |
65 | orderComputeData.delivery_way && _.set(data, 'delivery_way', orderComputeData.delivery_way); | 67 | orderComputeData.delivery_way && _.set(data, 'delivery_way', orderComputeData.delivery_way); |
66 | - orderComputeData.promotion_formula_list && _.set(data, 'shopping_cart_data.promotion_formula_list', orderComputeData.promotion_formula_list); | ||
67 | - orderComputeData.last_order_amount && _.set(data, 'shopping_cart_data.last_order_amount', orderComputeData.last_order_amount); | 68 | + orderComputeData.promotion_formula_list && |
69 | + _.set(data, 'shopping_cart_data.promotion_formula_list', orderComputeData.promotion_formula_list); | ||
70 | + orderComputeData.last_order_amount && | ||
71 | + _.set(data, 'shopping_cart_data.last_order_amount', orderComputeData.last_order_amount); | ||
68 | } | 72 | } |
69 | 73 | ||
70 | // delivery_address 中 提取信息 | 74 | // delivery_address 中 提取信息 |
@@ -75,8 +79,10 @@ function tranformPayment(data, orderInfo, cartType, skuList, orderComputeData) { | @@ -75,8 +79,10 @@ function tranformPayment(data, orderInfo, cartType, skuList, orderComputeData) { | ||
75 | 79 | ||
76 | result.name = cookieAddress ? cookieAddress.consignee : addressData.consignee; | 80 | result.name = cookieAddress ? cookieAddress.consignee : addressData.consignee; |
77 | result.phoneNum = cookieAddress ? cookieAddress.mobile : addressData.mobile; | 81 | result.phoneNum = cookieAddress ? cookieAddress.mobile : addressData.mobile; |
78 | - result.addressId = cookieAddress ? parseInt(crypto.decrypt(null, cookieAddress.address_id), 10) : addressData.address_id; | ||
79 | - result.addressInfo = cookieAddress ? cookieAddress.address_info : [addressData.area, addressData.address].join(' '); | 82 | + result.addressId = cookieAddress ? |
83 | + parseInt(crypto.decrypt(null, cookieAddress.address_id), 10) : addressData.address_id; | ||
84 | + result.addressInfo = cookieAddress ? | ||
85 | + cookieAddress.address_info : [addressData.area, addressData.address].join(' '); | ||
80 | 86 | ||
81 | result.addressId = crypto.encryption(null, result.addressId + ''); | 87 | result.addressId = crypto.encryption(null, result.addressId + ''); |
82 | isSunfengSupport = isSupport === 'Y'; | 88 | isSunfengSupport = isSupport === 'Y'; |
@@ -271,7 +277,7 @@ function tranformPayment(data, orderInfo, cartType, skuList, orderComputeData) { | @@ -271,7 +277,7 @@ function tranformPayment(data, orderInfo, cartType, skuList, orderComputeData) { | ||
271 | result.cartPayData = cartData.promotion_formula_list; | 277 | result.cartPayData = cartData.promotion_formula_list; |
272 | result.num = cartData.goods_count; | 278 | result.num = cartData.goods_count; |
273 | result.goodsPrice = cartData.str_order_amount; | 279 | result.goodsPrice = cartData.str_order_amount; |
274 | - result.price = _.get(orderComputeData, 'last_order_amount', null) ? | 280 | + result.price = _.isNumber(orderComputeData.last_order_amount) ? |
275 | orderComputeData.last_order_amount : cartData.last_order_amount; | 281 | orderComputeData.last_order_amount : cartData.last_order_amount; |
276 | 282 | ||
277 | if (cartData.gain_yoho_coin > 0) { | 283 | if (cartData.gain_yoho_coin > 0) { |
-
Please register or login to post a comment