Authored by mlge

种草文档更新

1、个人主页基本信息---头像、昵称、简介、关注、粉丝、获赞、收藏##
app.grass.getGrassUserBaseInfo
#### 请求参数
int authorUid--作者uid
### 响应
code为200即为成功,否则是失败。
{
"alg": "SALT_MD5",
"code": 200,
"data":
{
"attCount": 123,//关注
"fansCount": 0,//粉丝
"headIco": "",
"nickName": "",
"praiseAndfavorite": 234,
"signature": "你好,种草",
"articleCount": 0,//发布的文章总数
"favoriteCount": 4,//收藏文章总数
}
]
"md5": "ab23ca1c16260cb2de642071b0966f8b",
"message": "操作成功"
}
3、个人主页-内容列表 分页查询用户发布帖子列表
app.grass.userPublishedArticleList
int authorUid
int page ;
int limit ;
int uid;--当前登录者uid
### 响应
code为200即为成功,否则是失败。
{
"alg": "SALT_MD5",
"code": 200,
"data": {
"list": [
{"articleId": 40,
"authorName":"",
"authorUid": 500031572,
"content": "sdf",
"coverImage": "http://flv01.static.yhbimg.com/activity/2019/01/17/15/03af583b020c2045de674f50110d1deeec.jpg",
"favoriteCount": 0,
},{"articleId": 40,
"authorName":"",
"authorUid": 500031572,
"content": "sdf",
"coverImage": "http://flv01.static.yhbimg.com/activity/2019/01/17/15/03af583b020c2045de674f50110d1deeec.jpg",
"favoriteCount": 0,
}]
}
"md5": "ab23ca1c16260cb2de642071b0966f8b",
"message": "操作成功"
}
4、个人主页-内容列表(详情) 分页查询用户发布帖子列表
app.grass.userPublishedArticleDetail
int authorUid
int page ;
int limit ;
int uid;--当前登录者uid
int articleId;--文章id
String direction ;--向上向下翻页 "next",“pre”
String fromListPage = "Y";--从列表页点进来的 N--从详情页向下或者向上翻页
### 响应
code为200即为成功,否则是失败。
{
"alg": "SALT_MD5",
"code": 200,
"data": {
"detailList": [//文章的详细信息
{
"articleId": 14,
"authorUid": 500031572,
"blockList": [
{
"articleId": 14,
"contentData": "{\"template_name\":\"image\",\"data\":\"{\\\"src\\\":\\\"http://img11.static.yhbimg.com/yhb-img01/2016/12/16/18/01c84b87d28efe5e733367aa8aa91c02a6.jpg\\\"}\"}",
"createTime": 1547703633,
"orderBy": 0,
"templateKey": "image"
},
{
"articleId": 14,
"contentData": "{\"template_name\":\"image\",\"data\":\"{\\\"src\\\":\\\"http://img11.static.yhbimg.com/yhb-img01/2016/12/16/18/01c84b87d28efe5e733367aa8aa91c02a6.jpg\\\"}\"}",
"createTime": 1547703633,
"orderBy": 1,
"templateKey": "image"
}
],
"comments": [],
"favoriteCount": 0,
"hasAttention": "N",
"hasFavor": "N",
"hasPraise": "N",
"praiseCount": 0,
"productList": [
{
"id": 26,
"orderBy": 0,
"productSkn": 51068726
},
{
"id": 28,
"orderBy": 1,
"productSkn": 51068724
}
],
"publishTime": 1547703633,
"publishTimeStr": "2019-01-17 13:40:33",
"topicName": "123"
},
.....
]
}
"md5": "ab23ca1c16260cb2de642071b0966f8b",
"message": "操作成功"
}
5、个人主页-收藏列表 分页查询收藏帖子/文章列表
app.grass.userFavouriteArticleList
int authorUid
int page ;
int limit ;
### 响应
code为200即为成功,否则是失败。
{
"alg": "SALT_MD5",
"code": 200,
"data": {
"list": [
{"articleId": 40,
"authorName":"",
"authorUid": 500031572,
"content": "sdf",
"coverImage": "http://flv01.static.yhbimg.com/activity/2019/01/17/15/03af583b020c2045de674f50110d1deeec.jpg",
"favoriteCount": 0,
},{"articleId": 40,
"authorName":"",
"authorUid": 500031572,
"content": "sdf",
"coverImage": "http://flv01.static.yhbimg.com/activity/2019/01/17/15/03af583b020c2045de674f50110d1deeec.jpg",
"favoriteCount": 0,
}]
}
"md5": "ab23ca1c16260cb2de642071b0966f8b",
"message": "操作成功"
}
6、个人主页-收藏列表(详情页) 分页查询收藏帖子/文章列表
app.grass.userFavouriteArticleDetail
int authorUid
int page ;
int limit ;
int uid;--当前登录者uid
int articleId;--文章id
String direction ;--向上向下翻页 "next",“pre”
String fromListPage = "Y";--从列表页点进来的 N--从详情页向下或者向上翻页
### 响应
code为200即为成功,否则是失败。
{
"alg": "SALT_MD5",
"code": 200,
"data": {
"detailList": [//文章的详细信息
{
"articleId": 14,
"authorUid": 500031572,
"blockList": [
{
"articleId": 14,
"contentData": "{\"template_name\":\"image\",\"data\":\"{\\\"src\\\":\\\"http://img11.static.yhbimg.com/yhb-img01/2016/12/16/18/01c84b87d28efe5e733367aa8aa91c02a6.jpg\\\"}\"}",
"createTime": 1547703633,
"orderBy": 0,
"templateKey": "image"
},
{
"articleId": 14,
"contentData": "{\"template_name\":\"image\",\"data\":\"{\\\"src\\\":\\\"http://img11.static.yhbimg.com/yhb-img01/2016/12/16/18/01c84b87d28efe5e733367aa8aa91c02a6.jpg\\\"}\"}",
"createTime": 1547703633,
"orderBy": 1,
"templateKey": "image"
}
],
"comments": [],
"favoriteCount": 0,
"hasAttention": "N",
"hasFavor": "N",
"hasPraise": "N",
"praiseCount": 0,
"productList": [
{
"id": 26,
"orderBy": 0,
"productSkn": 51068726
},
{
"id": 28,
"orderBy": 1,
"productSkn": 51068724
}
],
"publishTime": 1547703633,
"publishTimeStr": "2019-01-17 13:40:33",
"topicName": "123"
},
.....
]
}
"md5": "ab23ca1c16260cb2de642071b0966f8b",
"message": "操作成功"
}
\ No newline at end of file
... ...
## 因栏目分类一期前端写死,后期要做成可配的。所以约定栏目对应code固定不变,关注:1001; 推荐:1002; 话题:1003; 晒单:1004; 潮物;1005; 鉴定:1006;
\ No newline at end of file
## 因栏目分类一期前端写死,后期要做成可配的。所以约定栏目对应code固定不变,关注:1001; 推荐:1002; 话题:1003; 晒单:1004; 潮物;1005; 鉴定:1006;
#话题相关
1、app.grass.getGrassTopicSimpleInfo (获取话题的基本信息,话题简介、关注人数等)
#### 请求参数
int topicId;--话题id
int uid;
### 响应
code为200即为成功,否则是失败。
{
"alg": "SALT_MD5",
"code": 200,
"data":{
"topicImageUrl":"imageUrl"
"topicName":"title",
"topicDesc":"desc",
"attCount":"参与人数",
"isAttend":"是否已关注"--Y--已关注,N--尚未关注
},
"md5": "ab23ca1c16260cb2de642071b0966f8b",
"message": "操作成功"
}
2、app.grass.topicRealtedArticleDetail(获取话题文章列表详情)
#### 请求参数
int topicId;--话题id
int uid;
int page;
int limit;
### 响应
code为200即为成功,否则是失败。
{
"alg": "SALT_MD5",
"code": 200,
"data":{
返回字段与推荐详情页接口一致
},
"md5": "ab23ca1c16260cb2de642071b0966f8b",
"message": "操作成功"
}
3、发布选择话题列表
app.grass.getTopicList
请求参数: int page;
int limit;
响应:code为200即为成功,否则是失败。
{
"alg": "SALT_MD5",
"code": 200,
"data":{
["topicId":"话题id",
"topicName":"话题名称"},{"topicId":"话题id",
"topicName":"话题名称"}]
},
"md5": "ab23ca1c16260cb2de642071b0966f8b",
"message": "操作成功"
}
4、内容发布---最近使用话题列表 接口##
app.grass.getTopicRecentUsed
#### 请求参数
int uid;
### 响应
code为200即为成功,否则是失败。
{
"alg": "SALT_MD5",
"code": 200,
"data":
[
{"topicId":"话题id"
"topicName":"话题描述"
},
{"topicId":"话题id"
"topicName":"话题描述"
}
]
"md5": "ab23ca1c16260cb2de642071b0966f8b",
"message": "操作成功"
}
\ No newline at end of file
... ...