主题
新闻中心
获取新闻分类
| 项目 | 内容 |
|---|---|
| 接口描述 | 获取新闻分类 |
| 接口地址 | /console/v1/news/type |
| 请求方式 | GET |
| 接口版本 | v1 |
请求参数
无
响应参数
| name | type | default | desc |
|---|---|---|---|
| list | array | - | desc:新闻分类列表 |
| list[].id | int | - | desc:新闻分类ID |
| list[].name | string | - | desc:名称 |
| list[].news_num | int | - | desc:新闻数量 |
| count | int | - | desc:全部新闻数量 |
会员中心首页新闻列表
| 项目 | 内容 |
|---|---|
| 接口描述 | 会员中心首页新闻列表 |
| 接口地址 | /console/v1/news/index |
| 请求方式 | GET |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| keywords | string | - | 搜索范围标题validate:optional | desc:关键字 |
| page | int | - | validate:optional | desc:页数 |
| limit | int | - | validate:optional | desc:每页条数 |
| orderby | string | - | idvalidate:optional | desc:排序字段 |
| sort | string | - | ascdescvalidate:optional | desc:升降序 |
响应参数
| name | type | default | desc |
|---|---|---|---|
| list | array | - | desc:新闻列表 |
| list[].id | int | - | desc:新闻ID |
| list[].title | string | - | desc:标题 |
| list[].img | string | - | desc:新闻缩略图 |
| list[].type | string | - | desc:类型 |
| list[].create_time | int | - | desc:创建时间 |
新闻列表
| 项目 | 内容 |
|---|---|
| 接口描述 | 新闻列表 |
| 接口地址 | /console/v1/news |
| 请求方式 | GET |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| addon_idcsmart_news_type_id | int | - | validate:optional | desc:分类ID |
| keywords | string | - | 搜索范围标题validate:optional | desc:关键字 |
| page | int | - | validate:optional | desc:页数 |
| limit | int | - | validate:optional | desc:每页条数 |
| orderby | string | - | idvalidate:optional | desc:排序字段 |
| sort | string | - | ascdescvalidate:optional | desc:升降序 |
响应参数
| name | type | default | desc |
|---|---|---|---|
| list | array | - | desc:新闻列表 |
| list[].id | int | - | desc:新闻ID |
| list[].title | string | - | desc:标题 |
| list[].img | string | - | desc:新闻缩略图 |
| list[].create_time | int | - | desc:创建时间 |
新闻详情
| 项目 | 内容 |
|---|---|
| 接口描述 | 新闻详情 |
| 接口地址 | /console/v1/news/:id |
| 请求方式 | GET |
| 接口版本 | v1 |
请求参数
| name | type | default | validate | desc |
|---|---|---|---|---|
| id | int | - | validate:required | desc:新闻ID |
响应参数
| name | type | default | desc |
|---|---|---|---|
| news | object | - | desc:新闻 |
| news.id | int | - | desc:新闻ID |
| news.addon_idcsmart_news_type_id | int | - | desc:分类ID |
| news.type | string | - | desc:分类名 |
| news.title | string | - | desc:标题 |
| news.content | string | - | desc:内容 |
| news.keywords | string | - | desc:关键字 |
| news.attachment | string | - | desc:附件 |
| news.create_time | int | - | desc:创建时间 |
| news.update_time | int | - | desc:更新时间 |
| news.prev | object | - | desc:上一条新闻 |
| news.prev.id | int | - | desc:新闻ID |
| news.prev.title | string | - | desc:标题 |
| news.next | object | - | desc:下一条新闻 |
| news.next.id | int | - | desc:新闻ID |
| news.next.title | string | - | desc:标题 |