[TOC=2]
## baner列表
~~~[api]
get:/banner/list
int:current_page=1#當前頁
int:page_number=10#頁碼
<<<
success
{
"code": 0,
"data": {
"list": [
{
"id": 1,//banner id
"title": "99123",//標題
"img": "http://www.baidu.com",//圖片地址
"url": "http://www.baidu.com",//連接地址
"is_enable": false,//是否顯示 false 不顯示 true 顯示
"position": 1,//所在位置 待定
"create_time": "2018-03-20 17:02:45"//創建時間
}
],
"current_page": 1,//當前頁
"page_number": 10,//頁碼
"total": 9//總條數
}
}
~~~
## 修改查詢
~~~[api]
get:/banner/edit
*int:id=0#banner id
<<<
success
// 正確id返回
{
"code": 0,
"data": {
"id": 1, // banner id
"title": "99123",//標題
"img": "http://www.baidu.com",//圖片地址
"url": "http://www.baidu",//連接地址
"is_enable": false,//是否顯示 false 不顯示 true 顯示
"position": 1,//所在位置 待定
"create_time": "2018-03-20 17:02:45"//創建時間
}
}
<<<
success
// id 不存在返回
{
"code": 0
}
~~~
## banner 搜索
~~~[api]
get:/banner/search
*string:search=""#標題
<<<
success
{
"code": 0,
"data": {
"list": [
{
"id": 1,//banner id
"title": "99123",//標題
"img": "http://www.baidu.com",//圖片地址
"url": "http://www.baidu.com",//連接地址
"is_enable": false,//是否顯示 false 不顯示 true 顯示
"position": 1,//所在位置 待定
"create_time": "2018-03-20 17:02:45"//創建時間
}
]
}
}
~~~
## 新增、修改
~~~[api]
post:/banner/saveData
int:id=0#banner id
*string:title=標題#標題
*string:img=http://www.baidu.com#圖片地址
*string:url=http://www.baidu.com#連接地址
*boolean:is_enable=false#是否顯示
*int:position=1#所在位置
<<<
success
{
"code": 0,
"data": {
"id": 1,
"title": "33",
"img": "http://www.baidu.com",
"url": "http://www.baidu",
"is_enable": true,
"position": 1
}
}
<<<
error
{
"code": -1,
"msg":"參數錯誤"
}
~~~
## banner刪除
~~~[api]
post:/banner/delete
*int:id=0#banner id
<<<
success
{
"code":0,
"data":[
"id":0
]
}
~~~