...
|
...
|
@@ -5,6 +5,7 @@ |
|
|
'use strict';
|
|
|
|
|
|
const Promise = require('bluebird');
|
|
|
const _ = require('lodash');
|
|
|
const co = Promise.coroutine;
|
|
|
|
|
|
const Api = require('./detail-consult-api');
|
...
|
...
|
@@ -26,8 +27,7 @@ module.exports = class extends global.yoho.BaseModel { |
|
|
if (!consultList.code || consultList.code !== 200) {
|
|
|
return [];
|
|
|
}
|
|
|
|
|
|
return consultList.data.list.map(value => {
|
|
|
return _.get(consultList, 'data.list', []).map(value => {
|
|
|
return {
|
|
|
avatar: detailHelper.DEFAULT_AVATAR_ICO,
|
|
|
question: value.ask,
|
...
|
...
|
@@ -38,7 +38,7 @@ module.exports = class extends global.yoho.BaseModel { |
|
|
like: parseInt(value.like, 10),
|
|
|
isUseful: value.is_useful === 'Y',
|
|
|
useful: parseInt(value.useful, 10),
|
|
|
totakl: value.total
|
|
|
total: value.total
|
|
|
};
|
|
|
});
|
|
|
|
...
|
...
|
|