[TOC=2]
## 廣告列表
~~~[api]
get:/advert/list
int:current_page=1#當前頁
int:page_number=10#頁碼
<<<
success
{
"code": 0,
"data": {
"list": [
{
"id": 1,
"title": "123",//標題
"img": "http://www.baidu.com",//圖片地址
"url": "http://www.baidu.com",//連接地址
"content": "hrh",//詳細內容
"is_enable": false,//是否顯示
"create_time": "2018-05-15 18:23:04"//創建時間
}
],
"current_page": 1,
"page_number": 10,
"total": 1
}
}
~~~
## 新增修改
~~~[api]
post:/advert/saveData
int:id=0#id
*sting:title=標題#標題
*string:img=圖片地址#圖片地址
*string:url=連接地址#連接地址
*boolean:is_enable=是否顯示#是否顯示
*string:content=詳細內容#詳細內容
<<<
success
//修改返回
{
"code": 0,
"data": {
"id": 1,
"title": "123",
"img": "http://www.baidu.com",
"url": "http://www.baidu.com",
"is_enable": false,
"content": "hrh"
}
}
<<<
success
//新增返回
{
"code": 0,
"data": {
"title": "123",
"img": "http://www.baidu.com",
"url": "http://www.baidu.com",
"is_enable": false,
"content": "hrh",
"id": 2
}
}
<<<
error
{
"code": -1,
"msg": "標題必須"
}
~~~
## 修改查詢
~~~[api]
get:/advert/edit
*int:id=1#id
<<<
success
{
"code": 0,
"data": {
"id": 1,
"title": "123",//標題
"img": "http://www.baidu.com",//圖片地址
"url": "http://www.baidu.com",//連接地址
"content": "hrh",//詳細內容
"is_enable": false,//是否顯示
"create_time": "2018-05-15 18:23:04"//創建時間
}
}
~~~
## 廣告刪除
~~~[api]
post:/advert/delete
*int:id=1#id
<<<
success
{
"code": 0,
"data": {
"id": 1
}
}
~~~
## 批量刪除
~~~[api]
post:/advert/deleteBatch
*array:id_list=[1]#id 數組
<<<
success
{
"code": 0
}
~~~