Authored by 郭成尧

gender

@@ -4,7 +4,8 @@ const _ = require('lodash'); @@ -4,7 +4,8 @@ const _ = require('lodash');
4 const helpers = global.yoho.helpers; 4 const helpers = global.yoho.helpers;
5 const GENDER = { 5 const GENDER = {
6 1: '男', 6 1: '男',
7 - 2: '女' 7 + 2: '女',
  8 + 3: '男|女'
8 }; 9 };
9 10
10 /** 11 /**
@@ -232,7 +233,9 @@ exports.processProductList = (list, options) => { @@ -232,7 +233,9 @@ exports.processProductList = (list, options) => {
232 product.similar = true; 233 product.similar = true;
233 } 234 }
234 235
235 - product.seoTitle = `${product.brand_name}|${product.gender ? GENDER[product.gender] + '|': ''}${product.small_sort_name}|${product.product_name}|YOHO!BUY有货`; // eslint-disable-line 236 + let seoGender = product.gender ? GENDER[product.gender] + '|' : '';
  237 +
  238 + product.seoTitle = `${product.brand_name}|${seoGender}${product.small_sort_name}|${product.product_name}|YOHO!BUY有货`; // eslint-disable-line
236 239
237 pruductList.push(product); 240 pruductList.push(product);
238 }); 241 });