🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
[TOC] ## 列表 ~~~[api] get:/landmark *int:id=1#市id <<< success { "code": 0, "data": { "data": [ { "id": 1, "name": "内光华",//地标名 "county": "青羊区",//区名 "city": "成都市",//市名 "province": "四川省"//省名 } ], "currentPage": 1,//当前页 "pageNumber": 10,//页码 "count": 1//总条数 } } <<< error { "code": -1, "msg": "参数错误!" } ~~~ ## 列表分页 ~~~[api] get:/landmark/pag *int:currentPage=1#当前页 *int:pageNumber=10#页码 <<< success { "code": 0, "data": { "data": [ { "id": 1, "name": "内光华",//地标名 "county": "青羊区",//区名 "city": "成都市",//市名 "province": "四川省"//省名 } ] } } <<< error { "code": -1, "msg": "参数错误!" } ~~~ ## 搜索 ~~~[api] get:/landmark/search *string:search=内光华#地标名 <<< success { "code": 0, "data": { "data": [ { "id": 1, "name": "内光华",//地标名 "county": "青羊区",//区名 "city": "成都市",//市名 "province": "四川省"//省名 } ] } } <<< error { "code": -1, "msg": "参数错误!" } ~~~ ## 新增保存 ~~~[api] post:/landmark/save *string:name=区名#区名 *string:longitude=23.22#经度 *string:latitude=22.33#纬度 *int:county_id=1#区id <<< success { "code": 0 } <<< error { "code": -1, "msg": "参数错误!" } ~~~ ## 修改查询 ~~~[api] get:/landmark/edit *int:id=1#列表 id <<< success { "code": 0, "data": { "data": { "id": 1, "name": "内光华", "longitude": "103.977147", "latitude": "30.674078", "county_id": 1, "city_id": 1, "province_id": 1 } } } <<< error { "code": -1, "msg": "参数错误!" } ~~~ ## 修改保存 ~~~[api] post:/landmark/update *int:id=1#列表 id *string:name=区名#区名 *string:longitude=23.22#经度 *string:latitude=22.33#纬度 *int:county_id=1#区id <<< success { "code": 0 } <<< error { "code": -1, "msg": "参数错误!" } ~~~ ## 删除 ~~~[api] post:/landmark/delete *int:id=1#列表 id <<< success { "code":0 } <<< error { "code": -1, "msg": "参数错误!" } ~~~