Authored by 毕凯

Merge branch 'feature/seo2' into 'gray'

Feature/seo2



See merge request !1105
... ... @@ -294,6 +294,9 @@ const index = (req, res, next) => {
data.guang.wxFooter = wxFooter;
res.render('info/index', Object.assign({
page: 'info-index',
canonical: {
currentHref: `https://www.yohobuy.com${req.originalUrl}`
},
gender: gender,
wechatShare: true,
isWeixin: isWeixin,
... ...
... ... @@ -84,7 +84,7 @@ const keyId = (req, res, next) => {
'total', 0)}${queryKey}、产品的详细参数,实时报价,价格行情,图片、评价、品牌等信息。买${queryKey},就上YOHO!BUY有货`,
pageFooter: true,
canonical: {
currentHref: `//www.yohobuy.com${req.originalUrl}`
currentHref: `https://www.yohobuy.com${req.originalUrl}`
}
});
}).catch(next);
... ...
... ... @@ -63,7 +63,7 @@ const newDetail = {
result: result,
page: 'new-detail',
canonical: {
currentHref: `//www.yohobuy.com${req.originalUrl}`
currentHref: `https://www.yohobuy.com${req.originalUrl}`
},
title: `【${result.brandName}${result.sortName}${result.goodsName}|YOHO!BUY 有货`,
keywords: result.brandName + result.sortName + ',' + result.brandName + result.sortName + '价格,' +
... ...
... ... @@ -294,7 +294,7 @@ const shop = {
if (domain) {
_.assign(finalResult, {
canonical: {
currentHref: `https://${domain}.m.yohobuy.com`
currentHref: `https://www.yohobuy.com${req.originalUrl}`
}
});
}
... ...
... ... @@ -25,7 +25,7 @@
</span>
{{/ comments}}
</div>
<a class="comment-content-footer tap-hightlight" href="{{commentsUrl}}">
<a class="comment-content-footer tap-hightlight" href="{{commentsUrl}}" rel="nofollow">
查看更多
<span class="iconfont">&#xe604;</span>
</a>
... ...
... ... @@ -75,7 +75,7 @@ class ProductListWithFilter {
* 滚动加载
*/
window.onscroll = function() {
if (self.scrollActived) {
if (self.scrollActived && !self.nav.end) {
setTimeout(function() {
let afterScroll = window.scrollY;
... ... @@ -110,7 +110,9 @@ class ProductListWithFilter {
// 去掉正在加载
$('.search-divide').remove();
let noResult = !result || result.length < 1 || (result.list && result.list.length < 1);
let noResult = !result || !result.length ||
result.length < 1 ||
(result.list && result.list.length < 1);
// 没有结果输出没有结果页面
if (noResult) {
... ...