Authored by 周少峰

Merge branch 'feature/keywordsMove' into gray

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