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 {
async getSearchHistory() {
const { ctx } = this;
let ret = {
search_history: {
results: [],
count: 0
}
};
if (!ctx.appUserId || !ctx.userId) {
//如果没有登录就返回
......@@ -62,8 +60,8 @@ class PresellSearchHistoryService extends Service {
}
let searchHistoryList = await ctx.realestateModel.CdPresellSearchHistory.findAll(filter);
let list = _.uniq(_.map(searchHistoryList, 'key_word'));
ret.search_history.results = list;
ret.search_history.count = list.length;
ret.results = list;
ret.count = list.length;
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