简要描述:
搜索文章列表
请求域名:
- http://xx.com
请求URL:
plugin.decorate.admin.decorate-common.search-article
参数:
参数名 | 是否必须 | 类型 | 说明 |
---|---|---|---|
page | 否 | int | 分页 |
pageSize | 否 | int | 分页 (默认10条) |
title | 否 | string | 文章标题(用于搜索) |
返回示例:
正确时返回:
{
"result": 1,
"msg": "成功",
"data": {
"total": 4,
"per_page": 10,
"current_page": 1,
"last_page": 1,
"next_page_url": null,
"prev_page_url": null,
"from": 1,
"to": 4,
"data": [
{
"id": 6,
"title": "付费测试",
"author": "编辑小芸 ",
"thumb": "https://shop-yunzshop-com.oss-cn-hangzhou.aliyuncs.com//newimage/55812ff61cb4764ce2c995bdd7c37d91.jpg",
"created_at": "2020-03-17 15:23:09",
"liked": 0,
"virtual_at": "1970-01-01",
"category_name": "文章分类名称1"
},
{
"id": 8,
"title": "付费测试付费测试",
"author": "编辑小芸 ",
"thumb": "https://shop-yunzshop-com.oss-cn-hangzhou.aliyuncs.com//newimage/55812ff61cb4764ce2c995bdd7c37d91.jpg",
"created_at": "2020-03-17 15:49:30",
"liked": 0,
"virtual_at": "1970-01-01",
"category_name": "文章分类名称1"
}
]
}
}
错误时返回:
{
"result": 0,
"msg": "暂无数据",
"data": []
}
返回参数说明:
参数名 | 类型 | 说明 |
---|---|---|
data[total] | int | 数据总条数 |
data[per_page] | int | 每页显示多少条数据 |
data[current_page] | int | 当前页 |
data[data][id] | int | 文章id |
data[data][title] | strin | 文章标题 |
data[data][author] | strin | 作者名称 |
data[data][thumb] | string | 文章图片 |
data[data][created_at] | string | 文章创建时间 |
data[data][category_name] | string | 文章分类名称 |