多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
[TOC=3,3] ### 三级联动地址 ~~~[api] post:/index.php?ctl=Base_District&met=district&typ=json *string:pid#pid <<< success { "cmd_id": -140, "status": 200, "msg": "success", "data": { "items": [ { "district_id": "1", "district_name": "北京", "district_parent_id": "0", "district_displayorder": "0", "district_region": "华北", "district_is_leaf": "1", "district_is_level": "0", "id": "1", "parent_id": "0", "name": "北京", "level": 1, "district_level": 1, "district_icon": "ui-icon-star", "expanded": false, "loaded": false, "is_leaf": false }, { "district_id": "2", "district_name": "天津", "district_parent_id": "0", "district_displayorder": "0", "district_region": "华北", "district_is_leaf": "1", "district_is_level": "0", "id": "2", "parent_id": "0", "name": "天津", "level": 1, "district_level": 1, "district_icon": "ui-icon-star", "expanded": false, "loaded": false, "is_leaf": false }, { "district_id": "3", "district_name": "河北", "district_parent_id": "0", "district_displayorder": "0", "district_region": "华北", "district_is_leaf": "1", "district_is_level": "0", "id": "3", "parent_id": "0", "name": "河北", "level": 1, "district_level": 1, "district_icon": "ui-icon-star", "expanded": false, "loaded": false, "is_leaf": false } ] } } <<< error { "cmd_id": -140, "status": 250, "msg": "failure", "data": {} } ~~~ ### 添加收货地址 ~~~[api] post:/index.php?ctl=Buyer_User&met=addAddressInfo&typ=json *string:u#u *string:k#k *string:user_address_contact#user_address_contact *string:address_area#address_area *string:user_address_address#user_address_address *string:user_address_phone#user_address_phone *string:user_address_default#user_address_default *string:province_id#province_id *string:city_id#city_id *string:area_id#area_id <<< success { "cmd_id": -140, "status": 200, "msg": "success", "data": { "user_id": "10032", "user_address_contact": "王", "user_address_province_id": 4, "user_address_city_id": 87, "user_address_area_id": 1327, "user_address_area": "山西 长治市 平顺县 ", "user_address_address": "123456", "user_address_phone": "17632222222", "user_address_default": "1", "user_address_time": "2018-04-10 17:42:06", "user_address_id": 80 } } <<< error { "cmd_id": -140, "status": 250, "msg": "failure", "data": {} } ~~~ ### 收货地址列表 ~~~[api] post:/index.php?ctl=Buyer_User&met=address&typ=json&format=app *string:u#u *string:k#k <<< success { "cmd_id": -140, "status": 200, "msg": "success", "data": { "address_list": [ { "user_address_id": "38", "user_id": "10032", "user_address_contact": "王88", "user_address_province_id": "9", "user_address_city_id": "157", "user_address_area_id": "157", "user_address_area": "上海 松江区", "user_address_address": "漕河泾开发区", "user_address_phone": "", "user_address_company": "", "user_address_default": "0", "user_address_time": "2018-04-08 16:33:25", "id": "38", "address_info": "上海 松江区 松江区" } ] } } <<< error { "cmd_id": -140, "status": 250, "msg": "failure", "data": {} } ~~~ ### 删除收货地址 ~~~[api] post:/?ctl=Buyer_User&met=delAddress&typ=json *string:u#u *string:k#k *string:id#id { "cmd_id": -140, "status": 200, "msg": "success", "data": {} } <<< success <<< error { "cmd_id": -140, "status": 250, "msg": "failure", "data": {} } ~~~ ### 修改收货地址 ~~~[api] post:/index.php?ctl=Buyer_User&met=editAddressInfo&typ=json *string:u#u *string:k#k *string:user_address_id#user_address_id *string:user_address_contact#user_address_contact *string:address_area#address_area *string:user_address_address#user_address_address *string:user_address_phone#user_address_phone *string:user_address_default#user_address_default *string:province_id#province_id *string:city_id#city_id *string:area_id#area_id <<< success { "cmd_id": -140, "status": 200, "msg": "success", "data": { "user_id": "10032", "user_address_contact": "阳", "user_address_province_id": 4, "user_address_city_id": 0, "user_address_area_id": 1327, "user_address_area": "山西 山西 长治市 平顺县", "user_address_address": "弄123", "user_address_phone": "15565051397", "user_address_default": "0", "user_address_time": "2018-04-10 17:47:34", "user_address_id": 71 } } <<< error { "cmd_id": -140, "status": 250, "msg": "failure", "data": {} } ~~~