...
|
...
|
@@ -637,15 +637,8 @@ let getProductData = (data) => { |
|
|
|
|
|
Object.assign(finalResult.feedbacks, info[2]);
|
|
|
|
|
|
if (!info[4].total && !_.isEmpty(info[3]) && !_.get(info[2], 'feedbacks.consultsNum', 0)) {
|
|
|
Object.assign(finalResult.feedbacks, {
|
|
|
commonConsults: true,
|
|
|
consultsNum: true,
|
|
|
consults: _.take(info[3], 2)
|
|
|
});
|
|
|
}
|
|
|
|
|
|
if (info[4]) {
|
|
|
/* 如果有咨询,显示咨询,否则显示常见问题 */
|
|
|
if (info[4].total) {
|
|
|
finalResult.feedbacks.consultsNum = parseInt(info[4].total, 10);
|
|
|
|
|
|
Object.assign(finalResult.feedbacks, {
|
...
|
...
|
@@ -653,6 +646,12 @@ let getProductData = (data) => { |
|
|
consultsNum: parseInt(info[4].total, 10),
|
|
|
consults: _.take(info[4].list, 2)
|
|
|
});
|
|
|
} else if (!_.isEmpty(info[3]) && !_.get(info[2], 'feedbacks.consultsNum', 0)) {
|
|
|
Object.assign(finalResult.feedbacks, {
|
|
|
commonConsults: true,
|
|
|
consultsNum: true,
|
|
|
consults: _.take(info[3], 2)
|
|
|
});
|
|
|
}
|
|
|
|
|
|
return finalResult;
|
...
|
...
|
|