Authored by yyq

fuzzy key

... ... @@ -493,12 +493,16 @@ const getSearchKeywordData = (params, uid) => {
}
return Promise.all([
getFuzzyDatas(params.query),
getFuzzyDatas(`${params.query}`.substr(0, 2)),
getSearchData(initialData)
]).then(result => {
let fuzzy = [];
_.forEach(result[0], value => {
if (_.isEmpty(result[0])) {
result[0] = [];
}
_.forEach(_.slice(result[0], 0, 12), value => {
if (value.keyword === params.query) {
return;
}
... ...