Authored by 周少峰

Merge branch 'feature/keywordsMove' into gray

@@ -4,7 +4,6 @@ @@ -4,7 +4,6 @@
4 4
5 'use strict'; 5 'use strict';
6 6
7 -const _ = require('lodash');  
8 const api = global.yoho.API; 7 const api = global.yoho.API;
9 const config = global.yoho.config; 8 const config = global.yoho.config;
10 const redis = global.yoho.redis; 9 const redis = global.yoho.redis;
@@ -161,11 +160,7 @@ const getLikeAsync = (skn, limit) => { @@ -161,11 +160,7 @@ const getLikeAsync = (skn, limit) => {
161 160
162 // 根据small_sort从redis获取分类下的关键词 161 // 根据small_sort从redis获取分类下的关键词
163 const getRecommendKeywords = (smallSort) => { 162 const getRecommendKeywords = (smallSort) => {
164 - return redis.keysAsync(`global:yoho:seo:keywords:sortId:${smallSort}:page:*`).then(ldata => {  
165 - let key = _.shuffle(ldata)[0] || '';  
166 -  
167 - return redis.all([['get', key]]);  
168 - }).then(res => { 163 + return redis.all([['get', `golobal:yoho:seo:keywords:sortId:${smallSort}:page:1`]]).then(res => {
169 return res[0]; 164 return res[0];
170 }); 165 });
171 }; 166 };