简要描述:
- 知识库列表
请求域名:
- http://xx.com
请求URL:
route=plugin.message-base.frontend.base.index
参数:
参数名 | 是否必须 | 类型 | 说明 |
---|---|---|---|
is_recommend | 否 | int | 是否推荐 1推荐 |
page | 是 | int | 页数,默认1 |
show_type | 是 | int | 1PC端 2移动端 |
返回示例:
正确时返回:
{
"result": 1,
"msg": "成功",
"data": {
"current_page": 1,
"data": [
{
"id": 1,
"image": "images/1/2021/10/8e24d6ddfcd30ed54ba8e6ada21a320c.jpg",
"desc": "<p>fsoifjsopfks</p>\n<p>ddd</p>",
"name": "知识库1",
"updated_at": "2021-10-27 14:26:54",
"image_url": "http://shop-yunzshop-com.oss-cn-hangzhou.aliyuncs.com/images/1/2021/10/8e24d6ddfcd30ed54ba8e6ada21a320c.jpg",
"has_five_article": [
{
"id": 3,
"base_id": 1,
"visit_count": 14,
"article_name": "测试文章3",
"edit_at": null
},
{
"id": 1,
"base_id": 1,
"visit_count": 2,
"article_name": "测试文章2",
"edit_at": null
},
{
"id": 2,
"base_id": 1,
"visit_count": 2,
"article_name": "测试文章1",
"edit_at": null
}
]
},
{
"id": 5,
"image": "newimage/19b351f68cd8999452057c9031f27441.jpg",
"desc": "<p>大多是多</p>",
"name": "知识库300",
"updated_at": "2021-10-27 15:24:30",
"image_url": "http://shop-yunzshop-com.oss-cn-hangzhou.aliyuncs.com/newimage/19b351f68cd8999452057c9031f27441.jpg"
},
{
"id": 4,
"image": "newimage/8c77a5773d5938b37895ea6641dcb616.png",
"desc": "",
"name": "知识库2",
"updated_at": "2021-10-27 14:26:52",
"image_url": "http://dev8.yunzmall.com/static/upload/newimage/8c77a5773d5938b37895ea6641dcb616.png"
},
{
"id": 3,
"image": "newimage/19b351f68cd8999452057c9031f27441.jpg",
"desc": "",
"name": "知识库66",
"updated_at": "2021-10-27 14:26:53",
"image_url": "http://shop-yunzshop-com.oss-cn-hangzhou.aliyuncs.com/newimage/19b351f68cd8999452057c9031f27441.jpg"
},
{
"id": 2,
"image": "newimage/337eef80d5abdbb2e007cfcf705933c8.png",
"desc": "",
"name": "",
"updated_at": "2021-10-27 14:26:53",
"image_url": "http://shop-yunzshop-com.oss-cn-hangzhou.aliyuncs.com/newimage/337eef80d5abdbb2e007cfcf705933c8.png"
}
],
"first_page_url": "http://dev8.yunzmall.com/addons/yun_shop/api.php?page=1",
"from": 1,
"last_page": 1,
"last_page_url": "http://dev8.yunzmall.com/addons/yun_shop/api.php?page=1",
"next_page_url": null,
"path": "http://dev8.yunzmall.com/addons/yun_shop/api.php",
"per_page": 15,
"prev_page_url": null,
"to": 5,
"total": 5
}
}
错误时返回:
{
}
返回参数说明:
参数名 | 类型 | 说明 |
---|---|---|
名称 | 类型 | 说明 |
data.data[].id | int | 知识库ID |
data.data[].name | string | 知识库名称 |
data.data[].desc | string | 简介,富文本 |
data.data[].image_url | string | 封面 |
data.data[].updated_at | string | 最好编辑时间 |
data.data[].has_five_article | array | 浏览数最多的5篇文章 |
返回has_five_article参数说明:
参数名 | 类型 | 说明 |
---|---|---|
名称 | 类型 | 说明 |
id | int | 文章id |
visit_count | string | 浏览数 |
article_name | string | 文章名称 |