Authored by 郭成尧

tdk

... ... @@ -17,6 +17,18 @@ const stringProcess = require(`${utils}/string-process`);
const shopPrcs = require(`${utils}/shop-process`);
const co = require('bluebird').coroutine;
/**
* SEO 优化,页面 TDK
* @param {*} keyword
*/
const _tdkProcess = (keyword) => {
return {
title: `${keyword}| ${keyword}品牌旗舰店 |正品保证, YOHO!BUY 有货`,
keywords: `${keyword}${keyword}品牌旗舰店,${keyword}正品`,
description: `有货网${keyword}旗舰店销售${keyword}正品商品,100%质量保证,支持货到付款,想了解${keyword}价格、图片、评价等信息,就上YOHO!BUY 有货中国最大的潮流商品购物网站!`, // eslint-disable-line
};
};
const shop = {
/**
... ... @@ -199,7 +211,7 @@ const shop = {
let goodsList = productProcess.processProductList(_.get(goodsListApi, 'data.product_list', []));
res.render('newshop/shop-brand', {
res.render('newshop/shop-brand', _.assign({
module: 'product',
page: 'shop-brand',
pageHeader: headerModel.setNav({
... ... @@ -207,15 +219,12 @@ const shop = {
}),
showDownloadApp: true,
pageFooter: true,
title: title + '|' + title + '潮流服装服饰-Yoho!Buy有货',
keywords: title + ',' + title + '服装服饰,' + title + '潮流服装服饰',
description: title + '|Yoho!Buy有货' + title + '潮流服饰官方授权店!100%品牌正品保证,支持货到付款。',
brandId: brandId,
goodsList: goodsList,
shopPage: true,
_noLazy: true,
localCss: true
});
}, _tdkProcess(title)));
})().catch(next);
},
... ... @@ -253,10 +262,6 @@ const shop = {
shopInfo.shop_intro_link = helpers.urlFormat('/product/index/intro', { shop_id: shopId });
let finalResult = {
title: shopInfo.shop_name + '|' + shopInfo.shop_name + '潮流服装服饰-Yoho!Buy有货',
keywords: shopInfo.shop_name + ',' + shopInfo.shop_name + '服装服饰,' + shopInfo.shop_name + '潮流服装服饰',
description: shopInfo.shop_name + '|Yoho!Buy有货' + shopInfo.shop_name +
'潮流服饰官方授权店!100%品牌正品保证,支持货到付款。',
pageHeader: _.assign({
shopPage: {
text: '分类',
... ... @@ -299,7 +304,7 @@ const shop = {
res.render('newshop/shop-reds', _.assign(finalResult, {
shppFavHide: shppFavHide
}));
}, _tdkProcess(shopInfo.shop_name)));
})().catch(next);
},
... ... @@ -339,7 +344,7 @@ const shop = {
let appPath = 'yohobuy://yohobuy.com/goapp?openby:yohobuy={"action":"go.shop","params":{"shop_template_type":"1","shop_id":"' +
shopId + '","shop_name":"' + shopInfo.shop_name + '"}}';
res.render('newshop/shop-list', {
res.render('newshop/shop-list', _.assign({
module: 'product',
page: 'shop-list',
pageHeader: headerModel.setNav({
... ... @@ -347,9 +352,6 @@ const shop = {
}),
showDownloadApp: true,
pageFooter: true,
title: title + '|' + title + '潮流服装服饰-Yoho!Buy有货',
keywords: title + ',' + title + '服装服饰,' + title + '潮流服装服饰',
description: title + '|Yoho!Buy有货' + title + '潮流服饰官方授权店!100%品牌正品保证,支持货到付款。',
shopId: shopId,
shopInfo: shopInfo,
goodsList: goodsList,
... ... @@ -358,7 +360,7 @@ const shop = {
_noLazy: true,
localCss: true,
couponData
});
}, _tdkProcess(title)));
})().catch(next);
},
... ...