Authored by QC-L

fix error

@@ -26,7 +26,7 @@ const newContentCodes = { @@ -26,7 +26,7 @@ const newContentCodes = {
26 detail: 'cea0efae77f4e04c935beb1e87181247' 26 detail: 'cea0efae77f4e04c935beb1e87181247'
27 }, 27 },
28 production: { 28 production: {
29 - home: 'd9101626ba774147080596e482e5f697', 29 + home: '4b24541678c9fe0ca12c8fd205a6d427',
30 ready: '89141506b9926010f28915a82b3db61d', 30 ready: '89141506b9926010f28915a82b3db61d',
31 result: '3c3a94fd6c6e19508b6921acd7f6cbad', 31 result: '3c3a94fd6c6e19508b6921acd7f6cbad',
32 detail: 'cea0efae77f4e04c935beb1e87181247' 32 detail: 'cea0efae77f4e04c935beb1e87181247'
@@ -198,7 +198,7 @@ class GroupService extends global.yoho.BaseModel { @@ -198,7 +198,7 @@ class GroupService extends global.yoho.BaseModel {
198 let result = {}; 198 let result = {};
199 let tabCurrentIndex = tabIndex || 0; 199 let tabCurrentIndex = tabIndex || 0;
200 200
201 - result.index = await this.newIndex(); 201 + result.index = await this.newIndex() || [];
202 let filters = []; 202 let filters = [];
203 203
204 result.index.forEach(item => { 204 result.index.forEach(item => {
@@ -211,11 +211,9 @@ class GroupService extends global.yoho.BaseModel { @@ -211,11 +211,9 @@ class GroupService extends global.yoho.BaseModel {
211 item.queryString = JSON.stringify(item.query); 211 item.queryString = JSON.stringify(item.query);
212 }); 212 });
213 213
214 - let indexFilter = filters[tabCurrentIndex] || {}; 214 + let indexFilter = filters[tabCurrentIndex] || { query: [] };
215 let query = {}; 215 let query = {};
216 216
217 - console.log(filters);  
218 - console.log(indexFilter);  
219 indexFilter.query.forEach(item => { 217 indexFilter.query.forEach(item => {
220 query = Object.assign(query, item); 218 query = Object.assign(query, item);
221 }); 219 });
@@ -228,10 +226,16 @@ class GroupService extends global.yoho.BaseModel { @@ -228,10 +226,16 @@ class GroupService extends global.yoho.BaseModel {
228 } 226 }
229 227
230 async goodsTab(query, result = {}) { 228 async goodsTab(query, result = {}) {
231 - result.filterGroupList = await this.filterGroupList({  
232 - ...query,  
233 - });  
234 - return result; 229 + try {
  230 + result.filterGroupList = await this.filterGroupList({
  231 + ...query,
  232 + });
  233 + return result;
  234 + } catch (e) {
  235 + return {
  236 + error: e
  237 + };
  238 + }
235 } 239 }
236 240
237 async groupListIndex(params, uid) { 241 async groupListIndex(params, uid) {