Authored by 郭成尧

alt

<div class="item">
<a {{#if link}}href="{{link}}"{{/if}}>
<a {{#if link}}href="{{link}}"{{/if}} title="{{alt}}">
{{#if isGood}}
{{#ifor triple double single}}
{{#within index 3}}
<img class="item-pic" src="{{image2 src w=235 h=314}}" alt="{{@root.title}}">
<img class="item-pic" src="{{image2 src w=235 h=314}}" alt="{{alt}}">
{{^}}
<img class="item-pic lazy" data-original="{{image2 src w=235 h=314}}">
<img class="item-pic lazy" data-original="{{image2 src w=235 h=314}}" alt="{{alt}}">
{{/within}}
{{/ifor}}
{{^}}
{{#within index 3}}
<img class="item-pic" src="{{image2 src}}" alt="{{@root.title}}">
<img class="item-pic" src="{{image2 src}}" alt="{{alt}}">
{{^}}
<img class="item-pic lazy" data-original="{{image2 src}}">
<img class="item-pic lazy" data-original="{{image2 src}}" alt="{{alt}}">
{{/within}}
{{/if}}
</a>
... ...
... ... @@ -2,7 +2,6 @@
* @Author: Targaryen
* @Date: 2017-03-23 11:02:31
* @Last Modified by: Targaryen
* @Last Modified time: 2017-08-11 11:40:02
*/
/* 红人店铺数据处理 */
... ... @@ -11,6 +10,11 @@
const _ = require('lodash');
const helpers = global.yoho.helpers;
const productPrcs = require('./product-process');
const GENDER = {
1: '男',
2: '女',
3: '男|女'
};
let countCarouselImage = 0; // 轮播图模块统计
... ... @@ -343,10 +347,15 @@ const pushGoodsInfo = (decorators, goodsList) => {
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 : '';
decorators[key].pics[subKey].isGood = true;
decorators[key].pics[subKey].alt = _.get(goodsObj, `${subValue.skn}.brand_name`, '') +
'|' + GENDER[_.get(goodsObj, `${subValue.skn}.gender`, '3')] +
'|' + _.get(goodsObj, `${subValue.skn}.small_sort_name`, '') +
'|' + _.get(goodsObj, `${subValue.skn}.product_name`, '');
if (value.module_type === 'TripleImage' ||
value.module_type === 'DoubleImage' ||
... ...