-
Notifications
You must be signed in to change notification settings - Fork 3
indexRecommend_admin
echisan edited this page Aug 29, 2018
·
1 revision
- 请求URL
/admin/index/recommend
- 请求方式
POST
- 请求参数
| 请求参数 | 参数类型 | require | 参数说明 |
|---|---|---|---|
| title | String | true | 推荐的标题 |
| link_url | String | true | 推荐的链接地址 |
| image_url | String | true | 推荐的封面图片地址 |
| show_index | String | true | 是否在首页显示(0:否,1:是) |
- 请求示例
/admin/index/recommend
{
"title":"【兄贵漂♂移】 重出江湖",
"image_url":"http://ws1.sinaimg.cn/large/7fa15162ly1fupp6q0y6fj20dc0a0mxg.jpg",
"link_url":"/#/bangumi/36",
"show_index":"1"
}- 请求结果
{
"code": 0,
"msg": "OK",
"data": {
"id": 1,
"title": "【兄贵漂♂移】 重出江湖",
"linkUrl": "/#/bangumi/36",
"imageUrl": "http://ws1.sinaimg.cn/large/7fa15162ly1fupp6q0y6fj20dc0a0mxg.jpg",
"createTime": 1535559908845,
"modifyTime": 1535559908845,
"recommendStatus": "NORMAL",
"publisherId": 6,
"showIndex": true
}
}- 请求URL
/admin/index/recommend/{irId}
- 请求方式
PUT
- 请求参数
| 请求参数 | 参数类型 | require | 参数说明 |
|---|---|---|---|
| title | String | true | 推荐的标题 |
| link_url | String | true | 推荐的链接地址 |
| image_url | String | true | 推荐的封面图片地址 |
| show_index | String | true | 是否在首页显示(0:否,1:是) |
- 请求示例
/admin/index/recommend/2
{
"title":"小美真好看~小美我老婆",
"image_url":"https://i.imgur.com/nEAdTRs.jpg",
"link_url":"/#/bangumi/22",
"show_index":"1"
}
- 请求结果
{
"code": 0,
"msg": "OK",
"data": {
"id": 2,
"title": "小美真好看~小美我老婆",
"linkUrl": "/#/bangumi/22",
"imageUrl": "https://i.imgur.com/nEAdTRs.jpg",
"createTime": 1535560074000,
"modifyTime": 1535560405791,
"recommendStatus": "NORMAL",
"publisherId": 6,
"showIndex": true
}
}- 请求URL
/admin/index/recommend/{irid}
- 请求方式
DELETE
- 请求参数
irid
- 请求示例
/admin/index/recommend/1
- 请求URL
/admin/index/recommend
- 请求方式
GET
- 请求参数
| 请求参数 | 参数类型 | require | 参数说明 |
|---|---|---|---|
| pn | int | false | page number (default = 1 |
| ps | int | false | page_size(default = 20 |
| sort | int | false | 排序,(1:按照显示在首页的推荐排序(修改时间),2:按照创建时间排序 |
- 请求实例
/admin/index/recommend?ps=1
- 返回结果
{
"code": 0,
"msg": "OK",
"data": {
"irs": [
{
"id": 2,
"title": "小美真好看~小美我老婆",
"linkUrl": "/#/bangumi/22",
"imageUrl": "https://i.imgur.com/nEAdTRs.jpg",
"createTime": 1535560074000,
"modifyTime": 1535560406000,
"recommendStatus": "NORMAL",
"publisherId": 6,
"showIndex": true
}
],
"page": {
"totalSize": 5,
"pageSize": 1,
"pageNumber": 1,
"allTotalSize": 0
}
}
}- 请求URL
/admin/index/recommend/{irid}
- 请求方式
GET
- 请求参数
irid
- 请求示例
/admin/index/recommend/1
- 返回结果
{
"code": 0,
"msg": "OK",
"data": {
"id": 1,
"title": "【兄贵漂♂移】 重出江湖",
"linkUrl": "/#/bangumi/36",
"imageUrl": "http://ws1.sinaimg.cn/large/7fa15162ly1fupp6q0y6fj20dc0a0mxg.jpg",
"createTime": 1535559909000,
"modifyTime": 1535559909000,
"recommendStatus": "NORMAL",
"publisherId": 6,
"showIndex": true
}
}