[TOC=2]
## 枚舉變量
## 獲取列表
~~~[api]
get:/service_items/list
int:current_page=1#當前頁
int:page_number=10#頁碼
int:parent_id=null#上一級id
<<<
success
{
"code": 0,
"data": {
"list": [
{
"id": 1,
"name": "便民",//項目名
"icon": "",//圖標 主要用于app 使用
"img": "",//圖片地址 可以來后臺使用
"status": true,//是否啟用
"sort":1,//顯示順序
"parent_id": null,//上級id
"create_time": "2018-03-27 15:27:21"//添加時間
}
],
"current_page": 1,
"page_number": 10,
"total": 1
}
}
~~~
## 修改查詢
~~~[api]
get:/service_items/edit
*int:id=0#列表的id
<<<
success
{
"code": 0,
"data": {
"id": 2,
"name": "便民",
"icon": "",
"img": "",
"status": true,
"parent_id": null,
"create_time": "2018-03-27 15:34:54"
}
}
<<<
error
{
"code": 0
}
~~~
## 新增修改
~~~[api]
post:/service_items/saveData
int:id=0#列表的id
*string:name=""#服務項目名
string:img=""#圖片地址
string:icon=""#圖標名
int:parent_id=null#上一級id
<<<
success
{
"code": 0,
"data": {
"name": "便民",//服務名
"parent_id": 1,//上一級id
"id": 6//id
}
}
<<<
error
{
"code": -1,
"msg": "服務名必須"
}
~~~
## 刪除
~~~[api]
post:/service_items/delete
*int:id=0#service_items id
<<<
success
{
"code":0,
"data":[
"id":0
]
}
~~~