Showing
1 changed file
with
18 additions
and
1 deletions
@@ -140,6 +140,23 @@ const _handelGlobalSort = (origin, params, originParams) => { | @@ -140,6 +140,23 @@ const _handelGlobalSort = (origin, params, originParams) => { | ||
140 | }; | 140 | }; |
141 | }; | 141 | }; |
142 | 142 | ||
143 | +const _getProductSeoData = (detail) => { | ||
144 | + let resData = {}; | ||
145 | + | ||
146 | + if (!_.isEmpty(detail)) { | ||
147 | + let gn = detail.product_name, | ||
148 | + bn = _.get(detail, 'brand_info.brand_name') || detail.product_source; | ||
149 | + | ||
150 | + resData = { | ||
151 | + title: `${bn} | ${gn}正品 | YOHO!BUY 有货`, | ||
152 | + keywords: `${bn},${bn}官网专卖店,${bn}官方授权店,${bn}正品,${bn}打折,${bn}折扣店,${bn}真品,${bn}代购`, | ||
153 | + description: `YOHO!BUY 有货-${bn}官方授权店,${gn}图片、报价、介绍。YOHO!BUY 有货${bn}官网专卖店提供${bn}正品、${bn}真品、 ${bn}打折、${bn}代购等。` // eslint-disable-line | ||
154 | + }; | ||
155 | + } | ||
156 | + | ||
157 | + return resData; | ||
158 | +}; | ||
159 | + | ||
143 | const getGlobalProductListData = (params, yoho) => { | 160 | const getGlobalProductListData = (params, yoho) => { |
144 | let limitNum = params.limit ? params.limit - 1 : 59; | 161 | let limitNum = params.limit ? params.limit - 1 : 59; |
145 | let dps = {}; | 162 | let dps = {}; |
@@ -340,7 +357,7 @@ const getGlobalProductDetailData = (skn, channelNum, channel) => { | @@ -340,7 +357,7 @@ const getGlobalProductDetailData = (skn, channelNum, channel) => { | ||
340 | Object.assign(resData, result.header, { | 357 | Object.assign(resData, result.header, { |
341 | goodsInfo: detailInfo, | 358 | goodsInfo: detailInfo, |
342 | detailHtml: html || '' | 359 | detailHtml: html || '' |
343 | - }); | 360 | + }, _getProductSeoData(detailInfo)); |
344 | 361 | ||
345 | return resData; | 362 | return resData; |
346 | }); | 363 | }); |
-
Please register or login to post a comment