Authored by 郭成尧

bundle-subprice0-handle

... ... @@ -31,10 +31,6 @@ const detail = (params) => {
}
return getBundleBySkn(params.skn).then(result => {
// let discountPrice = (_.get(result, 'data.bundleInfo.salesPrice', 0) -
// _.get(result, 'data.bundleInfo.discountPrice', 0));
// let priceShow = _.split(discountPrice + '', '.')[0];
return {
bundleInfo: _.get(result, 'data.bundleInfo', {}),
productList: productProcess.processProductList(_.get(result, 'data.productList', []))
... ...
... ... @@ -218,14 +218,12 @@ const tool = {
* @returns {{}}
*/
processBundle(bundleData, skn, gid) {
// let discountPrice = (_.get(bundleData, 'bundleInfo.salesPrice', 0) -
// _.get(bundleData, 'bundleInfo.discountPrice', 0));
// let priceShow = _.split(discountPrice + '', '.')[0];
let subPrice = _.get(bundleData, 'bundleInfo.subPrice', 0);
return {
title: '优惠套装',
href: helpers.urlFormat('/product/bundle/detail', {skn: skn, gid: gid}),
description: '立省¥' + _.get(bundleData, 'bundleInfo.subPrice', 0),
description: subPrice ? '立省¥' + subPrice : 0,
productList: productProcess.processProductList(bundleData && bundleData.productList)
};
},
... ...
... ... @@ -18,7 +18,9 @@
<div class="bundle-bar clearfix">
<div class="bundle-bar-md">
<div class="bundle-price">
{{#if subPrice}}
<span class="bundle-discount">立省¥{{subPrice}}</span>
{{/if}}
<span>套餐价: {{discountPriceStr}}</span>
</div>
<div class="sale-price">销售价: {{salesPriceStr}}</div>
... ...
... ... @@ -4,7 +4,9 @@
<div class="bundle-title">{{title}}</div>
<div class="bundle-right">
<a href="{{href}}">
<span class="bundle-desc">{{description}}</span>
{{#if description}}
<span class="bundle-desc">{{description}}</span>
{{/if}}
<span class="iconfont">&#xe604;</span>
</a>
</div>
... ...