Commit e847b119 authored by Hsinli's avatar Hsinli

add

parent a7b70be6
Pipeline #19662 passed with stage
in 58 seconds
...@@ -39,10 +39,8 @@ class PresellSearchHistoryService extends Service { ...@@ -39,10 +39,8 @@ class PresellSearchHistoryService extends Service {
async getSearchHistory() { async getSearchHistory() {
const { ctx } = this; const { ctx } = this;
let ret = { let ret = {
search_history: {
results: [], results: [],
count: 0 count: 0
}
}; };
if (!ctx.appUserId || !ctx.userId) { if (!ctx.appUserId || !ctx.userId) {
//如果没有登录就返回 //如果没有登录就返回
...@@ -62,8 +60,8 @@ class PresellSearchHistoryService extends Service { ...@@ -62,8 +60,8 @@ class PresellSearchHistoryService extends Service {
} }
let searchHistoryList = await ctx.realestateModel.CdPresellSearchHistory.findAll(filter); let searchHistoryList = await ctx.realestateModel.CdPresellSearchHistory.findAll(filter);
let list = _.uniq(_.map(searchHistoryList, 'key_word')); let list = _.uniq(_.map(searchHistoryList, 'key_word'));
ret.search_history.results = list; ret.results = list;
ret.search_history.count = list.length; ret.count = list.length;
return ret; return ret;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment