Authored by 王水玲

帮助中心修改

@@ -305,7 +305,7 @@ const detailData = (params) => { @@ -305,7 +305,7 @@ const detailData = (params) => {
305 return Promise.all(promiseData).then(result => { 305 return Promise.all(promiseData).then(result => {
306 let newData = _processDetailData(result, params); 306 let newData = _processDetailData(result, params);
307 307
308 - newData.data.hotSearch = _.slice(result[0].data, 0, 5); 308 + _.set(newData, 'data.hotSearch', _.slice(_.get(result, '[0].data', {}), 0, 5));
309 return newData; 309 return newData;
310 }); 310 });
311 }; 311 };
@@ -315,7 +315,7 @@ const searchData = (params) => { @@ -315,7 +315,7 @@ const searchData = (params) => {
315 return helpApi.helpSearch(params).then(result => { 315 return helpApi.helpSearch(params).then(result => {
316 return _.assign({ 316 return _.assign({
317 keywords: params.keywords 317 keywords: params.keywords
318 - }, _processSearch(result.data.data, params)); 318 + }, _processSearch(_.get(result, 'data.data', []), params));
319 }); 319 });
320 }; 320 };
321 321
@@ -11,7 +11,6 @@ var cutStr = function(params) { @@ -11,7 +11,6 @@ var cutStr = function(params) {
11 var i, curStr, addTxt; 11 var i, curStr, addTxt;
12 12
13 params.str = params.str.replace(/<[^>]*>/g, ''); 13 params.str = params.str.replace(/<[^>]*>/g, '');
14 - console.log(params.str)  
15 14
16 if (params.type === '2') { 15 if (params.type === '2') {
17 addTxt = ''; 16 addTxt = '';