Authored by 毕凯

Merge branch 'feature/bundle-phrase' into 'release/5.4'

套餐立省价格为0不显示



See merge request !127
@@ -31,10 +31,6 @@ const detail = (params) => { @@ -31,10 +31,6 @@ const detail = (params) => {
31 } 31 }
32 32
33 return getBundleBySkn(params.skn).then(result => { 33 return getBundleBySkn(params.skn).then(result => {
34 - // let discountPrice = (_.get(result, 'data.bundleInfo.salesPrice', 0) -  
35 - // _.get(result, 'data.bundleInfo.discountPrice', 0));  
36 - // let priceShow = _.split(discountPrice + '', '.')[0];  
37 -  
38 return { 34 return {
39 bundleInfo: _.get(result, 'data.bundleInfo', {}), 35 bundleInfo: _.get(result, 'data.bundleInfo', {}),
40 productList: productProcess.processProductList(_.get(result, 'data.productList', [])) 36 productList: productProcess.processProductList(_.get(result, 'data.productList', []))
@@ -218,14 +218,12 @@ const tool = { @@ -218,14 +218,12 @@ const tool = {
218 * @returns {{}} 218 * @returns {{}}
219 */ 219 */
220 processBundle(bundleData, skn, gid) { 220 processBundle(bundleData, skn, gid) {
221 - // let discountPrice = (_.get(bundleData, 'bundleInfo.salesPrice', 0) -  
222 - // _.get(bundleData, 'bundleInfo.discountPrice', 0));  
223 - // let priceShow = _.split(discountPrice + '', '.')[0]; 221 + let subPrice = _.get(bundleData, 'bundleInfo.subPrice', 0);
224 222
225 return { 223 return {
226 title: '优惠套装', 224 title: '优惠套装',
227 href: helpers.urlFormat('/product/bundle/detail', {skn: skn, gid: gid}), 225 href: helpers.urlFormat('/product/bundle/detail', {skn: skn, gid: gid}),
228 - description: '立省¥' + _.get(bundleData, 'bundleInfo.subPrice', 0), 226 + description: subPrice ? '立省¥' + subPrice : 0,
229 productList: productProcess.processProductList(bundleData && bundleData.productList) 227 productList: productProcess.processProductList(bundleData && bundleData.productList)
230 }; 228 };
231 }, 229 },
@@ -18,7 +18,9 @@ @@ -18,7 +18,9 @@
18 <div class="bundle-bar clearfix"> 18 <div class="bundle-bar clearfix">
19 <div class="bundle-bar-md"> 19 <div class="bundle-bar-md">
20 <div class="bundle-price"> 20 <div class="bundle-price">
  21 + {{#if subPrice}}
21 <span class="bundle-discount">立省¥{{subPrice}}</span> 22 <span class="bundle-discount">立省¥{{subPrice}}</span>
  23 + {{/if}}
22 <span>套餐价: {{discountPriceStr}}</span> 24 <span>套餐价: {{discountPriceStr}}</span>
23 </div> 25 </div>
24 <div class="sale-price">销售价: {{salesPriceStr}}</div> 26 <div class="sale-price">销售价: {{salesPriceStr}}</div>
@@ -4,7 +4,9 @@ @@ -4,7 +4,9 @@
4 <div class="bundle-title">{{title}}</div> 4 <div class="bundle-title">{{title}}</div>
5 <div class="bundle-right"> 5 <div class="bundle-right">
6 <a href="{{href}}"> 6 <a href="{{href}}">
7 - <span class="bundle-desc">{{description}}</span> 7 + {{#if description}}
  8 + <span class="bundle-desc">{{description}}</span>
  9 + {{/if}}
8 <span class="iconfont">&#xe604;</span> 10 <span class="iconfont">&#xe604;</span>
9 </a> 11 </a>
10 </div> 12 </div>