[TOC]
## 區域列表
~~~[api]
post:/region/list
string:key#排序字段名 如 id, name
string:order#排序規則
*int:page#頁碼
*int:limit#每頁數量
string:title#名字篩選
int:state#狀態篩選
<<<
success
{
"code": 0,
"info": "成功",
"data": [{
"id": 1,
"title": "西安2",
"state": 1,
"shop_count": 2
}, {
"id": 2,
"title": "渭南",
"state": 1,
"shop_count": 1
}, {
"id": 3,
"title": "寶雞",
"state": 1,
"shop_count": 0
}]
}
<<<
error
~~~
## 新建區域
~~~[api]
post:/region/add
*string:title=默認值#區域名稱
<<<
success
{
"code": 0,
"info": "成功",
"data": {
"title": "西安2",
"id": "1",
"state": "1"
}
}
<<<
error
{
"code": 10001,
"info": "名稱已存在",
"data": null
}
~~~
## 編輯區域
~~~[api]
post:/region/edit
*int:id=默認值#區域id
*string:title=默認值#名稱
*int:state=1#狀態 0=暫停 1=開啟
<<<
success
{
"code": 0,
"info": "成功",
"data": {
"title": "西安2",
"id": "1",
"state": "1"
}
}
<<<
error
{
"code": 10001,
"info": "名稱已存在",
"data": null
}
~~~