|
@@ -11,6 +11,7 @@ import HomeService from '../../services/HomeService'; |
|
@@ -11,6 +11,7 @@ import HomeService from '../../services/HomeService'; |
11
|
import timeago from '../../utils/timeago';
|
11
|
import timeago from '../../utils/timeago';
|
12
|
import {number10KFormater} from '../../utils/numberFormater';
|
12
|
import {number10KFormater} from '../../utils/numberFormater';
|
13
|
import {loginThenSyncUserInfo} from '../user/userActions';
|
13
|
import {loginThenSyncUserInfo} from '../user/userActions';
|
|
|
14
|
+import SlicedImage from '../../../common/components/SlicedImage';
|
14
|
|
15
|
|
15
|
const {
|
16
|
const {
|
16
|
|
17
|
|
|
@@ -302,6 +303,10 @@ function parseBNS(json) { |
|
@@ -302,6 +303,10 @@ function parseBNS(json) { |
302
|
forumInfo.map((item, i) => {
|
303
|
forumInfo.map((item, i) => {
|
303
|
let {hotPost, newPost} = item;
|
304
|
let {hotPost, newPost} = item;
|
304
|
|
305
|
|
|
|
306
|
+ let hotAvatar = hotPost && hotPost.user && hotPost.user.headIcon ? hotPost.user.headIcon : '';
|
|
|
307
|
+ hotAvatar = SlicedImage.getSlicedUrl(hotAvatar, 30, 30);
|
|
|
308
|
+ let newAvatar = newPost && newPost.user && newPost.user.headIcon ? newPost.user.headIcon : '';
|
|
|
309
|
+ newAvatar = SlicedImage.getSlicedUrl(newAvatar, 30, 30);
|
305
|
let sectionItem = {
|
310
|
let sectionItem = {
|
306
|
header: {
|
311
|
header: {
|
307
|
id: item.forumCode ? item.forumCode : 0,
|
312
|
id: item.forumCode ? item.forumCode : 0,
|
|
@@ -313,14 +318,14 @@ function parseBNS(json) { |
|
@@ -313,14 +318,14 @@ function parseBNS(json) { |
313
|
like: number10KFormater(item.praiseNum),
|
318
|
like: number10KFormater(item.praiseNum),
|
314
|
},
|
319
|
},
|
315
|
hot: {
|
320
|
hot: {
|
316
|
- avatar: hotPost && hotPost.user && hotPost.user.headIcon ? hotPost.user.headIcon : '',
|
321
|
+ avatar: hotAvatar,
|
317
|
content: hotPost && hotPost.contentData ? decodeURI(hotPost.contentData) : '',
|
322
|
content: hotPost && hotPost.contentData ? decodeURI(hotPost.contentData) : '',
|
318
|
hasImg: hotPost && hotPost.hasImgFlg ? hotPost.hasImgFlg : '',
|
323
|
hasImg: hotPost && hotPost.hasImgFlg ? hotPost.hasImgFlg : '',
|
319
|
postId: hotPost && hotPost.postId ? hotPost.postId : '',
|
324
|
postId: hotPost && hotPost.postId ? hotPost.postId : '',
|
320
|
postTitle: hotPost && hotPost.postsTitle ? decodeURI(hotPost.postsTitle) : '',
|
325
|
postTitle: hotPost && hotPost.postsTitle ? decodeURI(hotPost.postsTitle) : '',
|
321
|
},
|
326
|
},
|
322
|
new: {
|
327
|
new: {
|
323
|
- avatar: newPost && newPost.user && newPost.user.headIcon ? newPost.user.headIcon : '',
|
328
|
+ avatar: newAvatar,
|
324
|
content: newPost && newPost.contentData ? decodeURI(newPost.contentData) : '',
|
329
|
content: newPost && newPost.contentData ? decodeURI(newPost.contentData) : '',
|
325
|
hasImg: newPost && newPost.hasImgFlg ? newPost.hasImgFlg : '',
|
330
|
hasImg: newPost && newPost.hasImgFlg ? newPost.hasImgFlg : '',
|
326
|
postId: newPost && newPost.postId ? newPost.postId : '',
|
331
|
postId: newPost && newPost.postId ? newPost.postId : '',
|