Authored by ccbikai(👎🏻🍜)

Merge remote-tracking branch 'origin/master' into release/5.7

... ... @@ -56,12 +56,12 @@ const qaDetail = (params) => {
// 根据子id,父id,关键字,匹配问题详情
if (params.keyword) {
// 从搜索列表进入,有关键字
// 从搜索列表进入,有关键字
if (result && result[1] && result[1].data) {
let keyList = result[1].data.helper_list;
_.forEach(keyList, function(val) {
if (val.id === params.sonId) {
if (parseInt(val.id, 10) === parseInt(params.sonId, 10)) {
resu = {
caption: val.caption,
content: val.content
... ... @@ -70,11 +70,11 @@ const qaDetail = (params) => {
});
}
} else {
// 常见问题没有parentId
// 常见问题没有parentId
if (result && result[0] && result[0].data) {
if (!params.parentId) {
_.forEach(result[0].data.faqs, function(val) {
if (val.id === params.sonId) {
if (parseInt(val.id, 10) === parseInt(params.sonId, 10)) {
resu = {
caption: val.caption,
content: val.content
... ... @@ -83,10 +83,10 @@ const qaDetail = (params) => {
});
} else {
_.forEach(result[0].data.categorys, function(val) {
if (val.id === params.parentId) {
if (parseInt(val.id, 10) === parseInt(params.parentId, 10)) {
_.forEach(val.contentItems, function(item) {
if (item.id === params.sonId) {
if (parseInt(item.id, 10) === parseInt(params.sonId, 10)) {
resu = {
caption: item.caption,
content: item.content
... ...