Authored by htoooth

Merge branch 'feature/detail-op' into gray

... ... @@ -253,7 +253,9 @@ module.exports = class extends global.yoho.BaseModel {
// 根据small_sort从redis获取分类下的关键词
_getRecommendKeywords(smallSort, skn) { // eslint-disable-line
return redis.all([['get', `global:yoho:seo:keywords:sortId:${smallSort}:page`]]).then(res => {
return redis.all([['get', `global:yoho:seo:keywords:sortId:${smallSort}:page:${res[0] || 1}`]]);
return redis.all([
['get', `global:yoho:seo:keywords:sortId:${smallSort}:page:${ _.random(1, res[0]) || 1}`]
]);
}).then(res => {
return this._getKeywordsInfo(JSON.parse(res[0] || '[]'));
});
... ...