Showing
3 changed files
with
3 additions
and
3 deletions
@@ -104,7 +104,7 @@ module.exports = class favorite extends global.yoho.BaseModel { | @@ -104,7 +104,7 @@ module.exports = class favorite extends global.yoho.BaseModel { | ||
104 | url: '/home/favorite/reduction' | 104 | url: '/home/favorite/reduction' |
105 | }; | 105 | }; |
106 | 106 | ||
107 | - if (data.data.num) { | 107 | + if (data.data && data.data.num) { |
108 | result.count = +data.data.num; | 108 | result.count = +data.data.num; |
109 | result.phone = data.data.mobile; | 109 | result.phone = data.data.mobile; |
110 | } | 110 | } |
@@ -514,7 +514,7 @@ function getSalebreakingYardsData(params, channel) { | @@ -514,7 +514,7 @@ function getSalebreakingYardsData(params, channel) { | ||
514 | // 处理筛选条件数据 | 514 | // 处理筛选条件数据 |
515 | if (subResult[0].code === 200) { | 515 | if (subResult[0].code === 200) { |
516 | finalResult.leftContent = | 516 | finalResult.leftContent = |
517 | - publicHandler.handleSaleSortData(subResult[0].data.filter.group_sort, | 517 | + publicHandler.handleSaleSortData(_.get(subResult[0], 'data.filter.group_sort', []), |
518 | params, '', baseUrl); | 518 | params, '', baseUrl); |
519 | } | 519 | } |
520 | 520 |
@@ -1818,7 +1818,7 @@ exports.handleSuggestData = (origin, query) => { | @@ -1818,7 +1818,7 @@ exports.handleSuggestData = (origin, query) => { | ||
1818 | }]; | 1818 | }]; |
1819 | 1819 | ||
1820 | _.forEach(origin, value => { | 1820 | _.forEach(origin, value => { |
1821 | - if (query === value.keyword || value.keyword.length <= 2) { | 1821 | + if (!value.keyword || query === value.keyword || value.keyword.length <= 2) { |
1822 | return; | 1822 | return; |
1823 | } | 1823 | } |
1824 | 1824 |
-
Please register or login to post a comment