Merge branch 'feature/seo2' into 'gray'
Feature/seo2 See merge request !1105
Showing
6 changed files
with
11 additions
and
6 deletions
@@ -294,6 +294,9 @@ const index = (req, res, next) => { | @@ -294,6 +294,9 @@ const index = (req, res, next) => { | ||
294 | data.guang.wxFooter = wxFooter; | 294 | data.guang.wxFooter = wxFooter; |
295 | res.render('info/index', Object.assign({ | 295 | res.render('info/index', Object.assign({ |
296 | page: 'info-index', | 296 | page: 'info-index', |
297 | + canonical: { | ||
298 | + currentHref: `https://www.yohobuy.com${req.originalUrl}` | ||
299 | + }, | ||
297 | gender: gender, | 300 | gender: gender, |
298 | wechatShare: true, | 301 | wechatShare: true, |
299 | isWeixin: isWeixin, | 302 | isWeixin: isWeixin, |
@@ -84,7 +84,7 @@ const keyId = (req, res, next) => { | @@ -84,7 +84,7 @@ const keyId = (req, res, next) => { | ||
84 | 'total', 0)}条${queryKey}、产品的详细参数,实时报价,价格行情,图片、评价、品牌等信息。买${queryKey},就上YOHO!BUY有货`, | 84 | 'total', 0)}条${queryKey}、产品的详细参数,实时报价,价格行情,图片、评价、品牌等信息。买${queryKey},就上YOHO!BUY有货`, |
85 | pageFooter: true, | 85 | pageFooter: true, |
86 | canonical: { | 86 | canonical: { |
87 | - currentHref: `//www.yohobuy.com${req.originalUrl}` | 87 | + currentHref: `https://www.yohobuy.com${req.originalUrl}` |
88 | } | 88 | } |
89 | }); | 89 | }); |
90 | }).catch(next); | 90 | }).catch(next); |
@@ -63,7 +63,7 @@ const newDetail = { | @@ -63,7 +63,7 @@ const newDetail = { | ||
63 | result: result, | 63 | result: result, |
64 | page: 'new-detail', | 64 | page: 'new-detail', |
65 | canonical: { | 65 | canonical: { |
66 | - currentHref: `//www.yohobuy.com${req.originalUrl}` | 66 | + currentHref: `https://www.yohobuy.com${req.originalUrl}` |
67 | }, | 67 | }, |
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 + '价格,' + |
@@ -294,7 +294,7 @@ const shop = { | @@ -294,7 +294,7 @@ const shop = { | ||
294 | if (domain) { | 294 | if (domain) { |
295 | _.assign(finalResult, { | 295 | _.assign(finalResult, { |
296 | canonical: { | 296 | canonical: { |
297 | - currentHref: `https://${domain}.m.yohobuy.com` | 297 | + currentHref: `https://www.yohobuy.com${req.originalUrl}` |
298 | } | 298 | } |
299 | }); | 299 | }); |
300 | } | 300 | } |
@@ -25,7 +25,7 @@ | @@ -25,7 +25,7 @@ | ||
25 | </span> | 25 | </span> |
26 | {{/ comments}} | 26 | {{/ comments}} |
27 | </div> | 27 | </div> |
28 | - <a class="comment-content-footer tap-hightlight" href="{{commentsUrl}}"> | 28 | + <a class="comment-content-footer tap-hightlight" href="{{commentsUrl}}" rel="nofollow"> |
29 | 查看更多 | 29 | 查看更多 |
30 | <span class="iconfont"></span> | 30 | <span class="iconfont"></span> |
31 | </a> | 31 | </a> |
@@ -75,7 +75,7 @@ class ProductListWithFilter { | @@ -75,7 +75,7 @@ class ProductListWithFilter { | ||
75 | * 滚动加载 | 75 | * 滚动加载 |
76 | */ | 76 | */ |
77 | window.onscroll = function() { | 77 | window.onscroll = function() { |
78 | - if (self.scrollActived) { | 78 | + if (self.scrollActived && !self.nav.end) { |
79 | setTimeout(function() { | 79 | setTimeout(function() { |
80 | let afterScroll = window.scrollY; | 80 | let afterScroll = window.scrollY; |
81 | 81 | ||
@@ -110,7 +110,9 @@ class ProductListWithFilter { | @@ -110,7 +110,9 @@ class ProductListWithFilter { | ||
110 | // 去掉正在加载 | 110 | // 去掉正在加载 |
111 | $('.search-divide').remove(); | 111 | $('.search-divide').remove(); |
112 | 112 | ||
113 | - let noResult = !result || result.length < 1 || (result.list && result.list.length < 1); | 113 | + let noResult = !result || !result.length || |
114 | + result.length < 1 || | ||
115 | + (result.list && result.list.length < 1); | ||
114 | 116 | ||
115 | // 没有结果输出没有结果页面 | 117 | // 没有结果输出没有结果页面 |
116 | if (noResult) { | 118 | if (noResult) { |
-
Please register or login to post a comment