Merge branch 'hotfix/homeHeadico'
Showing
1 changed file
with
23 additions
and
7 deletions
@@ -35,11 +35,27 @@ exports.getCommentList = (uid, isComment, page, limit) => { | @@ -35,11 +35,27 @@ exports.getCommentList = (uid, isComment, page, limit) => { | ||
35 | limit = limit || 10; | 35 | limit = limit || 10; |
36 | 36 | ||
37 | const process = function*() { | 37 | const process = function*() { |
38 | - | ||
39 | - let result = yield api.post('', { | ||
40 | - method: 'web.show.queryOrderProductCommentList', | ||
41 | - uid: uid | ||
42 | - }); | 38 | + let resData = {}; |
39 | + | ||
40 | + // 临时解决个人中心-评论-用户头像缺失问题,待个人中心整体重构调整头像获取机制 | ||
41 | + let proInfo = yield Promise.all([ | ||
42 | + api.post('', { | ||
43 | + method: 'web.show.queryOrderProductCommentList', | ||
44 | + uid: uid | ||
45 | + }), | ||
46 | + api.get('', { | ||
47 | + method: 'app.passport.profile', | ||
48 | + uid: uid | ||
49 | + }) | ||
50 | + ]); | ||
51 | + | ||
52 | + let result = proInfo[0]; | ||
53 | + | ||
54 | + let headIco = _.get(proInfo, '[1].data.head_ico', ''); | ||
55 | + | ||
56 | + if (headIco) { | ||
57 | + resData.userThumb = helpers.image(headIco, 100, 100); | ||
58 | + } | ||
43 | 59 | ||
44 | let commentList = { | 60 | let commentList = { |
45 | isComment: isComment, | 61 | isComment: isComment, |
@@ -127,10 +143,10 @@ exports.getCommentList = (uid, isComment, page, limit) => { | @@ -127,10 +143,10 @@ exports.getCommentList = (uid, isComment, page, limit) => { | ||
127 | commentList.empty = isComment ? NO_COMMENTED_GOODS : NO_UNCOMMENT_GOODS; // 空数据 提示文字 | 143 | commentList.empty = isComment ? NO_COMMENTED_GOODS : NO_UNCOMMENT_GOODS; // 空数据 提示文字 |
128 | } | 144 | } |
129 | 145 | ||
130 | - return { | 146 | + return Object.assign(resData, { |
131 | comment: commentList, | 147 | comment: commentList, |
132 | pager: pagerObj | 148 | pager: pagerObj |
133 | - }; | 149 | + }); |
134 | }; | 150 | }; |
135 | 151 | ||
136 | return co(process)(); | 152 | return co(process)(); |
-
Please register or login to post a comment