Authored by 陈峰

Merge branch 'gray' into 'master'

Gray



See merge request !345
... ... @@ -43,10 +43,10 @@
{{/ is_solded}}
</div>
<div class="good-detail-text {{#for_stu}} stu-good-detail {{/for_stu}}">
<a href="{{url}}" target="_blank"{{#if noFollow}} rel="nofollow"{{/if}}>{{{product_name}}}</a>
<a href="{{url}}" target="_blank" title="{{#if productTitle}}{{productTitle}}{{^}}{{product_name}}{{/if}}" {{#if noFollow}} rel="nofollow"{{/if}}>{{{product_name}}}111</a>
<p class="brand">
{{#if brand_name}}
<a href="{{brandUrl}}"{{#if @root.pageNoFollow}} rel="nofollow"{{/if}}>{{brand_name}}</a>
<a href="{{brandUrl}}" title="{{#if productTitle}}{{productTitle}}{{^}}{{product_name}}{{/if}}" {{#if @root.pageNoFollow}} rel="nofollow"{{/if}}>{{brand_name}}</a>
{{/if}}
</p>
<p class="price {{#if vip}}vip-center{{/if}}">
... ...
... ... @@ -3,13 +3,6 @@ const _ = require('lodash');
const helpers = global.yoho.helpers;
const logger = global.yoho.logger;
const genderName = {
1: '男生',
2: '女生',
'1,3': '男生',
'2,3': '女生'
};
/**
* 处理接口返回图片链接,兼容非正常链接(如:/2015/10/22/08/023a5aa1cbdac7bdcd1685bfdab118b0c5.jpg)
*
... ... @@ -199,8 +192,17 @@ exports.processProductList = (list, options) => {
isfew ? proInfo.is_few = isfew : delete proInfo.is_few;
}
proInfo.productTitle = _.compact([product.brand_name_en, product.brand_name_cn || product.brand_name,
genderName[product.gender], product.small_sort_name, product.product_name]).join('|');
let genderStr = '';
if (_.get(options, 'from.params.gender') === '1,3') {
genderStr = '男士';
} else if (_.get(options, 'from.params.gender') === '2,3') {
genderStr = '女士';
} else {
genderStr = '';
}
proInfo.productTitle = `【${genderStr}${product.small_sort ? product.small_sort : ''}${product.product_name}`;
if (options.query && _.isString(proInfo.product_name)) {
try {
... ...
... ... @@ -131,13 +131,6 @@ const procProductImgs = (item, gender) => {
}
};
const genderName = {
1: '男生',
2: '女生',
'1,3': '男生',
'2,3': '女生'
};
/**
* 商品搜索商品数据处理
*/
... ... @@ -339,8 +332,17 @@ exports.processProductList = (list, options) => {
isfew ? product.is_few = isfew : delete product.is_few;
}
product.productTitle = _.compact([product.brand_name_en, product.brand_name_cn || product.brand_name,
genderName[product.gender], product.small_sort_name, product.product_name]).join('|');
let genderStr = '';
if (_.get(options, 'from.params.gender') === '1,3') {
genderStr = '男士';
} else if (_.get(options, 'from.params.gender') === '2,3') {
genderStr = '女士';
} else {
genderStr = '';
}
product.productTitle = `【${genderStr}${product.small_sort ? product.small_sort : ''}${product.product_name}`;
if (options.query && _.isString(product.product_name)) {
try {
... ...