Authored by yyq

fix service error

... ... @@ -104,7 +104,7 @@ module.exports = class favorite extends global.yoho.BaseModel {
url: '/home/favorite/reduction'
};
if (data.data.num) {
if (data.data && data.data.num) {
result.count = +data.data.num;
result.phone = data.data.mobile;
}
... ...
... ... @@ -514,7 +514,7 @@ function getSalebreakingYardsData(params, channel) {
// 处理筛选条件数据
if (subResult[0].code === 200) {
finalResult.leftContent =
publicHandler.handleSaleSortData(subResult[0].data.filter.group_sort,
publicHandler.handleSaleSortData(_.get(subResult[0], 'data.filter.group_sort', []),
params, '', baseUrl);
}
... ...
... ... @@ -1818,7 +1818,7 @@ exports.handleSuggestData = (origin, query) => {
}];
_.forEach(origin, value => {
if (query === value.keyword || value.keyword.length <= 2) {
if (!value.keyword || query === value.keyword || value.keyword.length <= 2) {
return;
}
... ...