...
|
...
|
@@ -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 {
|
...
|
...
|
|