article-api-map.js
1.19 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
48
49
50
module.exports = {
// 社区首页获取文章列表
'/api/grass/article/list': {
ufo: false,
auth: true,
api: 'app.grass.xyRecArticleList', // app.grass.columnArticleList
params: {
page: {type: Number},
limit: {type: Number}
}
},
// 刷新时获取有多少条新内容
'/api/grass/article/list/unread': {
ufo: false,
auth: true,
api: 'app.grass.getTotalInboxUnread',
params: {}
},
// 文章详情
'/api/grass/columnArticleDetail': {
api: 'app.grass.columnArticleDetail',
auth: true,
params: {
uid: {type: Number},
articleId: {type: Number, require: true},
singleDetail: {type: String, require: true}, // default value: Y
fromXianyu: {type: String, require: true}, // default value: Y
}
},
// 推荐文章
'/api/grass/xianyuOtherArticles': {
api: 'app.grass.xianyuOtherArticles',
params: {
articleId: {type: Number, require: true}
}
},
// 点赞
'/api/grass/updateArticlePraise': {
api: 'app.grass.updateArticlePraise',
auth: true,
params: {
articleId: {type: Number, require: true},
status: {type: Number, require: true}, // 0 未点赞 1点赞
}
},
};