新增/编辑收货地址

请求路由url

/api/shipping_address/createAndEdit

请求方式

POST

请求参数

参数 说明 类型 是否必要
token token string
id ID(新增为0,编辑为具体id) int
name 收货人 string
phone 手机 string
province 省份 string
province_id 省份id int
city 城市 string
city_id 城市id int
region string
region_id 区id int
detail 详细地址 string
is_default 是否默认地址(0:否;1:是) int

请求示例

{
    "id":0,
    "name":"收货人",
    "phone":"15521351443",
    "province":"广东省",
    "province_id":1,
    "city":"深圳市",
    "city_id":2,
    "region":"区",
    "region_id":3,
    "detail":"地址",
    "is_default":1
}

返回结果

{
    "code": 1,
    "msg": "ok",
    "time": "1641803174",
    "data": {
        "id": 15,
        "name": "收货人",
        "phone": "15521351443",
        "province_id": 1,
        "province": "广东省",
        "city_id": 2,
        "city": "深圳市",
        "region_id": 3,
        "region": "区",
        "detail": "地址",
        "user_id": 3,
        "is_default": 1,
        "createtime": "2022-01-10 16:26:14",
        "updatetime": "2022-01-10 16:26:14"
    }
}

字段注释

http://cicptest.cnlaunch.com/api/doc/index?model=\app\common\model\order\ShippingAddress