Merge branch 'gray' of git.yoho.cn:fe/yohobuywap-node into gray
Showing
4 changed files
with
10 additions
and
9 deletions
@@ -62,7 +62,7 @@ const newDetail = { | @@ -62,7 +62,7 @@ const newDetail = { | ||
62 | pageHeader: headerData, | 62 | pageHeader: headerData, |
63 | result: result, | 63 | result: result, |
64 | page: 'new-detail', | 64 | page: 'new-detail', |
65 | - title: `${result.brandName}${result.sortName}${result.goodsName}|YOHO!BUY 有货`, | 65 | + title: `${result.brandName}|${result.sortName}|${result.goodsName}|YOHO!BUY 有货`, |
66 | keywords: result.brandName + result.sortName + ',' + result.brandName + '官网专卖店,' + | 66 | keywords: result.brandName + result.sortName + ',' + result.brandName + '官网专卖店,' + |
67 | result.brandName + '官方授权店,' + result.brandName + '正品,' + result.brandName + '打折,' + | 67 | result.brandName + '官方授权店,' + result.brandName + '正品,' + result.brandName + '打折,' + |
68 | result.brandName + '折扣店,' + | 68 | result.brandName + '折扣店,' + |
@@ -35,7 +35,7 @@ const shop = { | @@ -35,7 +35,7 @@ const shop = { | ||
35 | if (shopId) { | 35 | if (shopId) { |
36 | let shopInfoApi = (yield req.ctx(shopModel).getShopInfo(shopId)) || {}; | 36 | let shopInfoApi = (yield req.ctx(shopModel).getShopInfo(shopId)) || {}; |
37 | 37 | ||
38 | - return res.redirect(301, `//m.yohobuy.com/shop/${_.get(shopInfoApi, 'data.shop_domain')}-${shopId}.html`); // eslint-disable-line | 38 | + return res.redirect(301, `//m.yohobuy.com/shop/${_.get(shopInfoApi, 'data.shop_domain', 'id')}-${shopId}.html`); // eslint-disable-line |
39 | } | 39 | } |
40 | 40 | ||
41 | if (domain) { | 41 | if (domain) { |
@@ -44,14 +44,14 @@ const shop = { | @@ -44,14 +44,14 @@ const shop = { | ||
44 | if (domainInfo.shopId && domainInfo.type === '2') { | 44 | if (domainInfo.shopId && domainInfo.type === '2') { |
45 | return res.redirect(301, `//m.yohobuy.com/shop/${domain}-${_.get(domainInfo, 'shopId')}.html`); | 45 | return res.redirect(301, `//m.yohobuy.com/shop/${domain}-${_.get(domainInfo, 'shopId')}.html`); |
46 | } else { | 46 | } else { |
47 | - return res.redirect(301, helpers.urlFormat('/index/brand', { | 47 | + return res.redirect(301, helpers.urlFormat('/product/index/brand', { |
48 | brand_id: _.get(domainInfo, 'id') | 48 | brand_id: _.get(domainInfo, 'id') |
49 | })); | 49 | })); |
50 | } | 50 | } |
51 | } | 51 | } |
52 | 52 | ||
53 | if (brandId) { | 53 | if (brandId) { |
54 | - return res.redirect(301, helpers.urlFormat('/index/brand', { brand_id: brandId })); | 54 | + return res.redirect(301, helpers.urlFormat('/product/index/brand', { brand_id: brandId })); |
55 | } | 55 | } |
56 | })().catch(next); | 56 | })().catch(next); |
57 | }, | 57 | }, |
@@ -148,9 +148,7 @@ class DetailProcess { | @@ -148,9 +148,7 @@ class DetailProcess { | ||
148 | }; | 148 | }; |
149 | 149 | ||
150 | if (value.shop_id) { | 150 | if (value.shop_id) { |
151 | - shopInfo.url = helpers.urlFormat('/product/shop', { | ||
152 | - shop_id: value.shop_id | ||
153 | - }); | 151 | + shopInfo.url = `/shop/${value.brand_domain}-${value.shop_id}.html`; |
154 | } else { | 152 | } else { |
155 | shopInfo.url = helpers.urlFormat('', null, value.brand_domain); | 153 | shopInfo.url = helpers.urlFormat('', null, value.brand_domain); |
156 | } | 154 | } |
@@ -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 | }); |
-
Please register or login to post a comment