index.js
1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
function processArticleListData(listData) {
return {
local: true,
articleId: +listData.articleId,
articleType: listData.articleType,
authorHeadIco: listData.assembleAuthorHeadIco,
authorName: listData.authorName,
authorType: listData.authorType,
authorUid: listData.authorUid,
coverImage: listData.assembleCoverImage,
articleTitle: listData.content,
imageWidth: listData.imageWidth,
imageHeight: listData.imageHeight,
blockList: [
{
articleId: +listData.articleId,
contentData: listData.assembleCoverImage,
height: listData.imageHeight,
templateKey: 'image',
width: listData.imageWidth
}, {
articleId: +listData.articleId,
contentData: listData.content,
templateKey: 'text',
}
],
commentCount: 0,
comments: [],
dataType: listData.dataType,
favoriteCount: 0,
hasAttention: 'N',
hasFavor: listData.hasFavor ? 'Y' : 'N',
hasPraise: listData.hasPraised ? 'Y' : 'N',
isAuthor: 'N',
labelList: [],
praiseCount: listData.praiseCount,
productList: [],
publishTime: listData.publishTime,
publishTimeStr: listData.publishTimeStr,
sort: listData.sort
};
}
export default {
processArticleListData
};