Authored by yyq

Merge branch 'hotfix/friendLinkQQ' into feature/modifyApi

... ... @@ -38,7 +38,7 @@
3、百度权重值大于等于5。<br><br>
欢迎交换友情链接,请通过以下方式联系。<br>
QQ :156030336(标注交换链接,带上网址)
QQ :2413949472(标注交换链接,带上网址)
</p>
</div>
</div>
... ...
... ... @@ -200,6 +200,10 @@ module.exports = class extends global.yoho.BaseModel {
// }
let shopInfo, shopId;
if (!ssubValue) {
return;
}
switch (ssubValue.type * 1) {
case 1:
extQs = {
... ...
... ... @@ -39,26 +39,26 @@ const index = (req, res, next) => {
return req.ctx(search).getSearchDataPre(Object.assign(params,
{uid: req.user.uid, prid: req.user.prid, query: queryKey}),
req.yoho.channel).then(result => {
req.yoho.channel).then(result => {
Object.assign(resData, result);
Object.assign(resData, result);
if (!_.get(resData, 'search.goods') || !_.get(resData, 'search.goods').length) {
_.set(resData, 'search.keyWord', queryKey);
return res.render('search/no-result', resData);
}
if (!_.get(resData, 'search.goods') || !_.get(resData, 'search.goods').length) {
_.set(resData, 'search.keyWord', queryKey);
return res.render('search/no-result', resData);
}
if (queryKey) {
Object.assign(resData, {
title: `${queryKey}价格_图片_品牌_怎么样-YOHO!BUY有货`,
keywords: `${queryKey},${queryKey}价格,${queryKey}图片,${queryKey}怎么样,${queryKey}品牌,YOHO!BUY有货`,
if (queryKey) {
Object.assign(resData, {
title: `${queryKey}价格_图片_品牌_怎么样-YOHO!BUY有货`,
keywords: `${queryKey},${queryKey}价格,${queryKey}图片,${queryKey}怎么样,${queryKey}品牌,YOHO!BUY有货`,
description: `YOHO!BUY有货网yohobuy.com是国内专业的${queryKey}网上潮流购物商城,为您找到${_.get(resData, 'search.totalCount', 0)}${queryKey}、产品的详细参数,实时报价,价格行情,图片、评价、品牌等信息。买${queryKey},就上YOHO!BUY有货` // eslint-disable-line
});
}
});
}
res.render('search/index', resData);
res.render('search/index', resData);
});
});
}).catch(next);
};
... ... @@ -210,21 +210,21 @@ const keyword = (req, res, next) => {
return req.ctx(search).getSearchKeywordData(Object.assign(params, {query: query}),
req.yoho.channel).then(result => {
Object.assign(resData, result, {
pageNoFollow: true,
title: `${query}价格_图片_品牌_怎么样-YOHO!BUY有货`,
keywords: `${query},${query}价格,${query}图片,${query}怎么样,${query}品牌,YOHO!BUY有货`,
description: `YOHO!BUY有货网yohobuy.com是国内专业的${query}网上潮流购物商城,为您找到${_.get(result,
Object.assign(resData, result, {
pageNoFollow: true,
title: `${query}价格_图片_品牌_怎么样-YOHO!BUY有货`,
keywords: `${query},${query}价格,${query}图片,${query}怎么样,${query}品牌,YOHO!BUY有货`,
description: `YOHO!BUY有货网yohobuy.com是国内专业的${query}网上潮流购物商城,为您找到${_.get(result,
'search.totalCount', 0)}${query}、产品的详细参数,实时报价,价格行情,图片、评价、品牌等信息。买${query},就上YOHO!BUY有货`
});
});
if (!_.get(resData, 'search.goods') || !_.get(resData, 'search.goods').length) {
_.set(resData, 'search.keyWord', query);
return res.render('search/no-result', resData);
}
res.render('search/index', resData);
if (!_.get(resData, 'search.goods') || !_.get(resData, 'search.goods').length) {
_.set(resData, 'search.keyWord', query);
return res.render('search/no-result', resData);
}
res.render('search/index', resData);
}).catch(next);
}).catch(next);
};
/**
... ... @@ -240,29 +240,29 @@ const keyId = (req, res, next) => {
return req.ctx(search).getSearchKeywordDataById(id, Object.assign({stocknumber: -1}, params),
req.yoho.channel).then(result => {
if (!result) {
return next();
}
if (!result) {
return next();
}
let query = result.queryKey;
let query = result.queryKey;
Object.assign(result, {
pageNoFollow: true,
title: `${query}价格_图片_品牌_怎么样-YOHO!BUY有货`,
keywords: `${query},${query}价格,${query}图片,${query}怎么样,${query}品牌,YOHO!BUY有货`,
description: `YOHO!BUY有货网yohobuy.com是国内专业的${query}网上潮流购物商城,为您找到${_.get(result,
Object.assign(result, {
pageNoFollow: true,
title: `${query}价格_图片_品牌_怎么样-YOHO!BUY有货`,
keywords: `${query},${query}价格,${query}图片,${query}怎么样,${query}品牌,YOHO!BUY有货`,
description: `YOHO!BUY有货网yohobuy.com是国内专业的${query}网上潮流购物商城,为您找到${_.get(result,
'search.totalCount', 0)}${query}、产品的详细参数,实时报价,价格行情,图片、评价、品牌等信息。买${query},就上YOHO!BUY有货`,
pageFooterSeo: {
description: `YOHO!BUY有货网yohobuy.com是国内专业的<b>${query}</b>网上潮流购物商城,为您找到<b>${_.get(result,
pageFooterSeo: {
description: `YOHO!BUY有货网yohobuy.com是国内专业的<b>${query}</b>网上潮流购物商城,为您找到<b>${_.get(result,
'search.totalCount', 0)}</b>条<b>${query}</b>、产品的详细参数,实时报价,价格行情,图片、评价、品牌等信息。买<b>` +
`${query}</b>,就上YOHO!BUY有货!`,
queryKey: query,
wapUrl: helpers.urlFormat(`/chanpin/${id}.html`, null, 'm')
}
});
queryKey: query,
wapUrl: helpers.urlFormat(`/chanpin/${id}.html`, null, 'm')
}
});
res.render('search/index', result);
}).catch(next);
res.render('search/index', result);
}).catch(next);
};
module.exports = {
... ...
... ... @@ -74,7 +74,7 @@
"css-loader": "^0.28.11",
"cssnano": "^3.10.0",
"eslint": "^4.19.1",
"eslint-config-yoho": "^1.0.9",
"eslint-config-yoho": "1.0.9",
"eslint-loader": "^1.6.3",
"extract-text-webpack-plugin": "^4.0.0-beta.0",
"handlebars": "4.0.5",
... ... @@ -101,7 +101,7 @@
"shelljs": "^0.8.1",
"style-loader": "^0.21.0",
"stylelint": "^9.2.0",
"stylelint-config-yoho": "^1.3.0",
"stylelint-config-yoho": "1.3.0",
"stylelint-formatter-table": "^1.0.3",
"webpack": "^4.6.0",
"webpack-cli": "^2.0.15",
... ...