Authored by 张孝茹

imgAlt

@@ -68,7 +68,7 @@ const newDetail = { @@ -68,7 +68,7 @@ const newDetail = {
68 title: `【${result.brandName}${result.sortName}${result.goodsName}|YOHO!BUY 有货`, 68 title: `【${result.brandName}${result.sortName}${result.goodsName}|YOHO!BUY 有货`,
69 keywords: result.brandName + result.sortName + ',' + result.brandName + result.sortName + '价格,' + 69 keywords: result.brandName + result.sortName + ',' + result.brandName + result.sortName + '价格,' +
70 result.brandName + result.sortName + '图片,', 70 result.brandName + result.sortName + '图片,',
71 - description: result.name + ' 有货网仅售' + result.goodsPrice.currentPrice + '元,购买' + 71 + description: result.goodsName + ' 有货网仅售' + result.goodsPrice.currentPrice + '元,购买' +
72 result.brandName + result.sortName + ',了解' + result.brandName + result.sortName + '商品信息就上有货网!', 72 result.brandName + result.sortName + ',了解' + result.brandName + result.sortName + '商品信息就上有货网!',
73 pageFooter: true, 73 pageFooter: true,
74 localCss: true, 74 localCss: true,
@@ -112,10 +112,9 @@ class DetailProcess { @@ -112,10 +112,9 @@ class DetailProcess {
112 112
113 bannerList.push({ 113 bannerList.push({
114 img: value.img, 114 img: value.img,
115 - imgAlt: _.get(origin, 'brand_info.brand_name_en', '') + '|' +  
116 - _.get(origin, 'brand_info.brand_name_cn', '') + '|' +  
117 - (_.get(origin, 'gender', '1') === '1' ? '男' : '女') + '|' +  
118 - _.get(origin, 'small_sort_name', '') + '|' + _.get(origin, 'product_name', '') 115 + imgAlt: _.compact([origin.brand_info.brand_name_en, origin.brand_info.brand_name_cn,
  116 + (_.get(origin, 'gender', '1') === '1' ? '男' : '女'), origin.small_sort_name,
  117 + origin.product_name]).join('|')
119 }); 118 });
120 }); 119 });
121 120
@@ -237,7 +237,7 @@ exports.processProductList = (list, options) => { @@ -237,7 +237,7 @@ exports.processProductList = (list, options) => {
237 237
238 product.seoTitle = `${product.brand_name}|${seoGender}${product.small_sort_name}|${product.product_name}|YOHO!BUY有货`; // eslint-disable-line 238 product.seoTitle = `${product.brand_name}|${seoGender}${product.small_sort_name}|${product.product_name}|YOHO!BUY有货`; // eslint-disable-line
239 239
240 - product.imgAlt = `${product.brand_name}|${seoGender}${product.small_sort_name}|${product.product_name}`; 240 + product.imgAlt = _.compact([product.brand_name, (product.gender ? GENDER[product.gender] : false), product.small_sort_name, product.product_name]).join('|');
241 241
242 pruductList.push(product); 242 pruductList.push(product);
243 }); 243 });