Authored by 李靖

合5.7.1

... ... @@ -18,12 +18,12 @@
</a>
{{#ifor isGood four}}
{{#if showProductInfo}}
{{#unless parent.noShowProductInfo}}
<div class="item-info">
<div class="text">{{text}}</div>
<div class="name">{{name}}</div>
<div class="price">{{salesPrice}}</div>
</div>
{{/if}}
{{/unless}}
{{/ifor}}
</div>
... ...
... ... @@ -51,7 +51,7 @@
{{#isEqual module_type 'SingleImage'}}
<div class="items-s1 clearfix">
{{#each ../pics}}
{{> reds-shop/item index=@../index single=true}}
{{> reds-shop/item index=@../index single=true parent=../..}}
{{/each}}
</div>
{{#if ../isModuleMargin}}
... ... @@ -61,7 +61,7 @@
{{#isEqual module_type 'DoubleImage'}}
<div class="items-s2 clearfix">
{{#each ../pics}}
{{> reds-shop/item index=@../index double=true}}
{{> reds-shop/item index=@../index double=true parent=../..}}
{{/each}}
</div>
{{#if ../isModuleMargin}}
... ... @@ -71,7 +71,7 @@
{{#isEqual module_type 'TripleImage'}}
<div class="{{#isEqual ../displayType 1}}items-3-3{{/isEqual}}{{#isEqual ../displayType 2}}items-3-3 items-small{{/isEqual}}{{#isEqual ../displayType 3}}items-3-2 items-3-2-right{{/isEqual}}{{#isEqual ../displayType 4}}items-3-2 items-3-2-left{{/isEqual}} clearfix">
{{#each ../pics}}
{{> reds-shop/item index=@../index triple=true}}
{{> reds-shop/item index=@../index triple=true parent=../..}}
{{/each}}
</div>
{{#if ../isModuleMargin}}
... ...
{
"name": "m-yohobuy-node",
"version": "5.7.2",
"version": "5.7.10",
"private": true,
"description": "A New Yohobuy Project With Express",
"repository": {
... ...
... ... @@ -2,7 +2,7 @@
* @Author: Targaryen
* @Date: 2017-03-23 11:02:31
* @Last Modified by: Targaryen
* @Last Modified time: 2017-05-02 11:09:37
* @Last Modified time: 2017-05-23 15:33:28
*/
/* 红人店铺数据处理 */
... ... @@ -34,7 +34,8 @@ const _linkhandle = (linkParent) => {
switch (parseInt(linkParent.linkType, 10)) {
case 0:
return helpers.urlFormat('', {
filter_poolId: linkParent.resource
filter_poolId: linkParent.resource,
title: linkParent.text
}, 'list');
case 1:
return helpers.urlFormat('/product/' + linkParent.resource + '.html');
... ... @@ -325,12 +326,18 @@ const pushGoodsInfo = (decorators, goodsList) => {
_.forEach(_.get(value, 'pics', []), (subValue, subKey) => {
let hasGoods = _.get(goodsObj, `${subValue.skn}.default_images`, false);
if (!hasGoods) {
decorators[key].noShowProductInfo = true;
}
if (subValue.skn && hasGoods) {
let salesPrice = _.get(goodsObj, `${subValue.skn}.sales_price`, '');
let marketPrice = _.get(goodsObj, `${subValue.skn}.market_price`, '');
let imageSrc = _.get(goodsObj, `${subValue.skn}.default_images`, '');
decorators[key].pics[subKey].showProductInfo = salesPrice !== 0;
if (salesPrice === 0) {
decorators[key].noShowProductInfo = true;
}
decorators[key].pics[subKey].name = _.get(goodsObj, `${subValue.skn}.product_name`, '');
decorators[key].pics[subKey].salesPrice = salesPrice ? '¥' + salesPrice : '';
decorators[key].pics[subKey].marketPrice = marketPrice ? '¥' + marketPrice : '';
... ...