Authored by yyq

我的评论用户头像

... ... @@ -35,11 +35,27 @@ exports.getCommentList = (uid, isComment, page, limit) => {
limit = limit || 10;
const process = function*() {
let result = yield api.post('', {
method: 'web.show.queryOrderProductCommentList',
uid: uid
});
let resData = {};
// 临时解决个人中心-评论-用户头像缺失问题,待个人中心整体重构调整头像获取机制
let proInfo = yield Promise.all([
api.post('', {
method: 'web.show.queryOrderProductCommentList',
uid: uid
}),
api.get('', {
method: 'app.passport.profile',
uid: uid
})
]);
let result = proInfo[0];
let headIco = _.get(proInfo, '[1].data.head_ico', '');
if (headIco) {
resData.userThumb = helpers.image(headIco, 100, 100);
}
let commentList = {
isComment: isComment,
... ... @@ -127,10 +143,10 @@ exports.getCommentList = (uid, isComment, page, limit) => {
commentList.empty = isComment ? NO_COMMENTED_GOODS : NO_UNCOMMENT_GOODS; // 空数据 提示文字
}
return {
return Object.assign(resData, {
comment: commentList,
pager: pagerObj
};
});
};
return co(process)();
... ...