Authored by htoooth

Merge branch 'feature/detail-op' into gray

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