ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
[TOC] ## 列表 ~~~[api] get:/city *int:id=1#省id <<< success { "code": 0, "data": { "data": [ { "province_id": 1,//省 id "name": "成都市",//市名 "id": 1 } ] } } <<< error { "code": -1, "msg": "参数错误!" } ~~~ ## 新增查询 ~~~[api] get:/city/read <<< success { "code": 0, "data": [ { "id": 1, "name": "四川省"//省名 } ] } ~~~ ## 新增保存 ~~~[api] post:/city/save *int:province_id=1#省id *string:name=市名#市名 <<< success { "code": 0, "data": { "id": "2", "name": "江苏省", "province_id": 1 } } <<< error { "code": -1, "msg": "参数错误!" } ~~~ ## 修改查询 ~~~[api] get:/city/edit *int:id=1#列表 id <<< success { "code": 0, "data": { "data": { "id": 1, "province_id": 1, "name": "成都市" } } } <<< error { "code": -1, "msg": "参数错误!" } ~~~ ## 修改保存 ~~~[api] post:/city/update *int:id=1#列表 id *int:province_id=1#省id *string:name=市名#市名 <<< success { "code": 0, "data": { "id": "2", "name": "江苏省", "province_id": 1 } } <<< error { "code": -1, "msg": "参数错误!" } ~~~ ## 删除 ~~~[api] post:/city/delete *int:id=1#列表 id <<< success { "code":0 } <<< error { "code": -1, "msg": "参数错误!" } ~~~