文档
测试

列表页

GET
/api/news

请求参数

参数名
类型
描述
必填
page
int
当前页
必填
cate_id
int
分类id
必填

响应参数

参数名
类型
描述
必填
code
int
0,获取成功,大于0,获取失败
必填
msg
string
失败描述(code大于0时返回)
必填
data
object
资讯数据(code等于0时返回)
必填
current_page
int
当前页
必填
last_page
int
最后一页
必填
data
array
资讯数据
必填
id
int
id
必填
title
string
标题
必填
thumbnail_http
string
列表图片
必填
img_art
object
顶部图片(img_art)
必填
thumbnail_http
string
图片地址
必填

说明 / 示例

{ "code": 0, "data": { "current_page": 1, "data": [ { "id": 8, "title": "测试", "thumbnail": "/images/1658718272281.jpg", "content": "测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试", "type_id": 11, "link": null, "ord": 0, "created_at": "2022-07-25 11:04:57", "updated_at": "2022-07-25 11:04:57", "remark": null, "times": 0, "img": "/images/1658718279792.jpg", "thumbnail_http": "http://127.0.0.77/images/1658718272281.jpg", "img_http": "http://127.0.0.77/images/1658718279792.jpg" } ], "first_page_url": "http://127.0.0.77/api/news?page=1", "from": 1, "last_page": 1, "last_page_url": "http://127.0.0.77/api/news?page=1", "next_page_url": null, "path": "http://127.0.0.77/api/news", "per_page": "3", "prev_page_url": null, "to": 1, "total": 1 }, "img_art": { "id": 7, "title": "图片", "thumbnail": "/images/1658717195986.jpg", "content": null, "type_id": 9, "link": null, "ord": 0, "created_at": "2022-07-25 10:46:40", "updated_at": "2022-07-25 10:46:40", "remark": null, "times": 0, "img": null, "thumbnail_http": "http://127.0.0.77/images/1658717195986.jpg", "img_http": "" } }