Authored by 王水玲

帮助中心修改

... ... @@ -305,7 +305,7 @@ const detailData = (params) => {
return Promise.all(promiseData).then(result => {
let newData = _processDetailData(result, params);
newData.data.hotSearch = _.slice(result[0].data, 0, 5);
_.set(newData, 'data.hotSearch', _.slice(_.get(result, '[0].data', {}), 0, 5));
return newData;
});
};
... ... @@ -315,7 +315,7 @@ const searchData = (params) => {
return helpApi.helpSearch(params).then(result => {
return _.assign({
keywords: params.keywords
}, _processSearch(result.data.data, params));
}, _processSearch(_.get(result, 'data.data', []), params));
});
};
... ...
... ... @@ -11,7 +11,6 @@ var cutStr = function(params) {
var i, curStr, addTxt;
params.str = params.str.replace(/<[^>]*>/g, '');
console.log(params.str)
if (params.type === '2') {
addTxt = '';
... ...