Authored by 郭成尧

'price-handle'

... ... @@ -216,12 +216,14 @@ const tool = {
* @returns {{}}
*/
processBundle(bundleData, skn) {
let discountPrice = (_.get(bundleData, 'bundleInfo.salesPrice', 0) -
_.get(bundleData, 'bundleInfo.discountPrice', 0));
let priceShow = _.split(discountPrice + '', '.')[0];
return {
title: '优惠套装',
href: helpers.urlFormat('/product/bundle/detail', {skn: skn}),
description: '立省¥' +
(parseInt(_.get(bundleData, 'bundleInfo.salesPrice', 0), 10) -
parseInt(_.get(bundleData, 'bundleInfo.discountPrice', 0), 10)) + '元',
description: '立省¥' + priceShow + '元',
productList: productProcess.processProductList(bundleData && bundleData.productList)
};
}
... ...
... ... @@ -14,7 +14,7 @@
{{# productList}}
<div class="swiper-slide plus plus-{{@index}}"><span class="iconfont">&#xe624;</span></div>
<div class="swiper-slide product-box">
<a href="{{url}}"><img src="{{image default_images 155 206}}" alt="{{product_name}}"></a>
<a href="{{@root.bundleData.href}}"><img src="{{image default_images 155 206}}" alt="{{product_name}}"></a>
<div class="bundle-price">{{sales_price}}</div>
</div>
{{/ productList}}
... ...