#### 详情
~~~[api]
get:/address/index
number:p=1#当前页数
number:ps=20#分页大小
<<<
success
{
"message": "success",
"code": 1,
"data": [
{
"id": "19",
"member_id": "9",
"consignee": "谢先生123",
"email": "",
"mobile": "18666864566",
"country": "0",
"province": "10000",
"city": "10001",
"district": "10011",
"twon": "10111",
"address": "具体我也不知道在哪",
"zipcode": "523000",
"is_default": "1",
"sort": "0",
"status": "10",
"created_at": "1522227083",
"updated_at": "1522227083"
}
],
"_meta": {
"totalCount": 1,
"pageCount": 1,
"currentPage": 1,
"perPage": 20
}
}
~~~
#### 列表
~~~[api]
get:/address/retrieve?id=:id
<<<
success
{
"message": "success",
"code": 1,
"data": {
"id": 1,
"member_id": 9,
"consignee": "谢先生",
"email": "",
"mobile": "18666864566",
"country": 0,
"province": 65535,
"city": 65535,
"district": 65535,
"twon": 65535,
"address": "具体我也不知道在哪",
"zipcode": "523000",
"is_default": 0,
"sort": 0,
"status": 10,
"created_at": 1522221710,
"updated_at": 1522221710
}
}
~~~
#### 创建
> 当前最大数量限制5条
~~~[api]
post:/address/create
*string:consignee#收货人
*string:mobile#手机
*string:province#省份
*string:city#城市
*string:district#地区
string:twon#乡镇
*string:address#详细地址
string:zipcode#邮编
number:is_default=0#是否默认地址
number:sort=0#排序
<<<
success
{
"message": "success",
"code": 1,
"data": {
"consignee": "谢先生",
"mobile": "18666864566",
"province": "10000",
"city": "10001",
"district": "10011",
"twon": "10111",
"address": "具体我也不知道在哪",
"zipcode": "523000",
"is_default": 1,
"sort": 0,
"member_id": 9,
"status": 10,
"created_at": 1522221897,
"updated_at": 1522221897,
"id": 3
}
}
<<<
error
{
"message": "您已经添加过相同的收货地址。",
"code": 0,
"data": []
}
<<<
example
{
"consignee": "谢先生",
"mobile": "18666864566",
"province": "10000",
"city": "10001",
"district": "10011",
"twon": "10111",
"address": "具体我也不知道在哪",
"zipcode": "523000",
"is_default": 1,
"sort": 0
}
~~~
#### 更新
~~~[api]
post:/address/update?id=:id
string:consignee#收货人
string:mobile#手机
string:province#省份
string:city#城市
string:district#地区
string:twon#乡镇
string:address#详细地址
string:zipcode#邮编
number:is_default=0#是否默认地址
number:sort=0#排序
<<<
success
{
"message": "success",
"code": 1,
"data": {
"id": 7,
"member_id": 9,
"consignee": "谢先生12",
"email": "",
"mobile": "18666864566",
"country": 0,
"province": 10000,
"city": 10001,
"district": 10011,
"twon": 10111,
"address": "具体我也不知道在哪",
"zipcode": "523000",
"is_default": 1,
"sort": 0,
"status": 10,
"created_at": 1522222093,
"updated_at": 1522225296
}
}
<<<
error
{
"message": "您已经添加过相同的收货地址。",
"code": 0,
"data": []
}
~~~
#### 删除
~~~[api]
post:/address/delete?id=:id
<<<
success
{
"message": "成功",
"code": 1,
"data": []
}
~~~