[toc]

维客 copy

环境

维客本地开发

key value
base_url http://192.168.1.173:83/module/chickenshop

|token|eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjE0LCJpc3MiOiJodHRwOi8vMTkyLjE2OC4xLjE3Mzo4My9tb2R1bGUvY2hpY2tlbnNob3AvbG9naW4iLCJpYXQiOjE1OTE5NDczNTgsImV4cCI6MTU5NzEzMTM1OCwibmJmIjoxNTkxOTQ3MzU4LCJqdGkiOiJYVmtISFlTcG94MkphWWhoIn0.JmZxP0snMDbYw789CtPCjm5P-bUZXsFIAUkczwLkzbw|

线上测试

key value
base_url https://weike.union-home.cn/module/chickenshop

|token|eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjE0LCJpc3MiOiJodHRwczovL3dlaWtlLnVuaW9uLWhvbWUuY24vbW9kdWxlL2NoaWNrZW5zaG9wL2xvZ2luIiwiaWF0IjoxNTkxOTQ3MzEyLCJleHAiOjE1OTcxMzEzMTIsIm5iZiI6MTU5MTk0NzMxMiwianRpIjoiSnVPTHowbWU5MmZ0aU9HZSJ9.q8Me828aLyC-QBperK8lSlHhMzRSPUx765VjKWTyLwo|

个人中心

我的订单

我的订单列表

GET {{base_url}}/order/getUserOrderList

Query

参数名 类型 必需 描述 示例
shop_type string 0 店铺类型 (1便利店 2炸鸡店) 1
order_status string 0 订单状态(-2售后订单 -1,订单已关闭,1待付款,2待接单,3进行中,4已完成)

Header

参数名 类型 必需 描述 示例
Authorization string 1 bearer {{token}}

返回示例

{
    "status": 200,
    "msg": "success",
    "data": {
        "current_page": 1,
        "data": [
            {
                "order_id": 3,
                "shop_id": 1,
                "order_no": "od1591002130442635",
                "uid": 14,
                "pay_type": 0,
                "order_time": "2020-06-01 17:02:10",
                "pay_time": null,
                "dispatch_type": 2,
                "dispatch_time": null,
                "dispatch_money": "0.00",
                "packing": "0.00",
                "receive_time": null,
                "dispatch_address": " ",
                "contacts_name": null,
                "phone": null,
                "fetch_time": "2020-06-01 17:02:10",
                "fetch_code": "MJ1591002130442978",
                "goods_money": "13.00",
                "order_money": "13.00",
                "actual_money": "8.00",
                "coupon_id": 0,
                "coupon_money": "0.00",
                "full_reduction": "{\"full_id\":1,\"shop_id\":1,\"shop_type\":1,\"use_money\":10,\"reduce_money\":5,\"status\":1,\"create_at\":\"2020-04-17 17:39:23\",\"update_at\":1587115548}",
                "full_reduction_money": "5",
                "user_note": "",
                "cart_pay_code": null,
                "order_status": 1,
                "pay_status": 0,
                "shipping_status": 0,
                "evaluate_status": 0,
                "created_at": "2020-06-01 17:02:10",
                "updated_at": "2020-06-01 18:11:24",
                "deleted_at": null,
                "order_status_name": "待付款",
                "dispatch_type_name": "自取",
                "shop": {
                    "shop_id": 1,
                    "shop_name": "便利店(爱联店)",
                    "shop_logo": "http://192.168.1.173:83/uploads/shop_logo/2020-04-15/5e96870366015.png",
                    "phone": "13113692222",
                    "shop_type": 1,
                    "shop_type_name": "便利店"
                },
                "order_goods": [
                    {
                        "id": 4,
                        "order_id": 3,
                        "goods_id": 4,
                        "goods_name": "百事可乐",
                        "goods_img": "goods/2020-04-17/5e99657739027.png",
                        "goods_num": 1,
                        "goods_price": "3.00",
                        "goods_packing": "0.00",
                        "created_at": "2020-06-01 17:02:10",
                        "updated_at": "2020-06-01 17:02:10"
                    },
                    {
                        "id": 5,
                        "order_id": 3,
                        "goods_id": 1,
                        "goods_name": "香辣鸡翅",
                        "goods_img": "goods/2020-04-15/5e96e85c35f1c.jpg",
                        "goods_num": 1,
                        "goods_price": "10.00",
                        "goods_packing": "0.00",
                        "created_at": "2020-06-01 17:02:10",
                        "updated_at": "2020-06-01 17:02:10"
                    }
                ]
            }
        ],
        "first_page_url": "http://192.168.1.173:83/module/chickenshop/order/getUserOrderList?page=1",
        "from": 1,
        "last_page": 1,
        "last_page_url": "http://192.168.1.173:83/module/chickenshop/order/getUserOrderList?page=1",
        "next_page_url": null,
        "path": "http://192.168.1.173:83/module/chickenshop/order/getUserOrderList",
        "per_page": 15,
        "prev_page_url": null,
        "to": 1,
        "total": 1
    }
}
参数名 类型 描述
data.data.order_time string
data.data.order_no string
data.data.actual_money string
data.data.goods_money string
data.data.order_goods array
data.data.shop object
data.data.fetch_code string
data.data.fetch_time string
data.data.phone string
data.data.dispatch_type number
data.data.dispatch_type_name string
data.data.order_status_name string
#### 订单详情
`
GET {{base_url}}/order/getUserOrderDetail
`

Query

参数名 类型 必需 描述 示例
order_id string 1

Header

参数名 类型 必需 描述 示例
Authorization string 1

返回示例

{
    "status": 200,
    "msg": "success",
    "data": {
        "order_id": 2,
        "shop_id": 1,
        "order_no": "od1591001311644314",
        "uid": 14,
        "pay_type": 0,
        "order_time": "2020-06-01 16:48:31",
        "pay_time": null,
        "dispatch_type": 2,
        "dispatch_time": null,
        "dispatch_money": "0.00",
        "packing": "0.00",
        "receive_time": null,
        "dispatch_address": " ",
        "contacts_name": null,
        "phone": null,
        "fetch_time": "2020-06-01 16:48:31",
        "fetch_code": "MJ1591001311644623",
        "goods_money": "56.00",
        "order_money": "56.00",
        "actual_money": "36.00",
        "coupon_id": 11,
        "coupon_money": "10.00",
        "full_reduction": "{\"full_id\":4,\"shop_id\":1,\"shop_type\":1,\"use_money\":20,\"reduce_money\":10,\"status\":1,\"create_at\":\"2020-04-17 17:39:23\",\"update_at\":1587352468}",
        "full_reduction_money": "10",
        "user_note": "",
        "cart_pay_code": null,
        "order_status": 1,
        "pay_status": 0,
        "shipping_status": 0,
        "evaluate_status": 0,
        "created_at": "2020-06-01 16:48:31",
        "updated_at": "2020-06-01 16:48:31",
        "deleted_at": null,
        "order_status_name": "待付款",
        "shop": {
            "shop_id": 1,
            "shop_name": "便利店(爱联店)",
            "shop_logo": "http://chicken.com/uploads/shop_logo/2020-04-15/5e96870366015.png",
            "phone": "13113692222",
            "shop_type": 1
        },
        "order_refund": null,
        "order_goods": [
            {
                "id": 1,
                "order_id": 2,
                "goods_id": 1,
                "goods_name": "香辣鸡翅",
                "goods_img": "goods/2020-04-15/5e96e85c35f1c.jpg",
                "goods_num": 1,
                "goods_price": "10.00",
                "goods_packing": "0.00",
                "created_at": "2020-06-01 16:48:31",
                "updated_at": "2020-06-01 16:48:31"
            },
            {
                "id": 2,
                "order_id": 2,
                "goods_id": 2,
                "goods_name": "奥尔良鸡翅",
                "goods_img": "goods/2020-04-15/5e96e87b772cc.png",
                "goods_num": 4,
                "goods_price": "10.00",
                "goods_packing": "0.00",
                "created_at": "2020-06-01 16:48:31",
                "updated_at": "2020-06-01 16:48:31"
            },
            {
                "id": 3,
                "order_id": 2,
                "goods_id": 4,
                "goods_name": "百事可乐",
                "goods_img": "goods/2020-04-17/5e99657739027.png",
                "goods_num": 2,
                "goods_price": "3.00",
                "goods_packing": "0.00",
                "created_at": "2020-06-01 16:48:31",
                "updated_at": "2020-06-01 16:48:31"
            }
        ]
    }
}

删除订单

POST {{base_url}}/order/deleteOrder

Query

参数名 类型 必需 描述 示例
order_id string 1

Header

参数名 类型 必需 描述 示例
Authorization string 1

返回示例

{
    "status": 200,
    "msg": "删除订单成功",
    "data": 1
}

取消订单

POST {{base_url}}/order/cancelOrder

Query

参数名 类型 必需 描述 示例
order_id string 1

Header

参数名 类型 必需 描述 示例
Authorization string 1

返回示例

{
    "status": 200,
    "msg": "取消订单成功",
    "data": 1
}

订单评价

POST {{base_url}}/order/evaluate

Query

参数名 类型 必需 描述 示例
order_id string 1
comments string 1
imgs string 1
des_score string 1
manner_score string 1
dispatch_score string 1

Header

参数名 类型 必需 描述 示例
Authorization string 1

邀请好友

邀请好友首页信息

GET {{base_url}}/user/getInvitationInfo

Header

参数名 类型 必需 描述 示例
Authorization string 1

我的好友列表

GET {{base_url}}/user/getInvitationUser

Header

参数名 类型 必需 描述 示例
Authorization string 1

投诉申请

投诉列表

GET {{base_url}}/user/getComplainList

Header

参数名 类型 必需 描述 示例
Authorization string 1 bearer {{token}}

返回示例

{
    "status": 200,
    "msg": "success",
    "data": {
        "current_page": 1,
        "data": [
            {
                "id": 1,
                "shop_name": "一号店",
                "uid": 14,
                "phone": "18617004850",
                "realname": "易鑫",
                "reason": "原因",
                "contents": "内容",
                "imgs": [
                    "http://192.168.1.173:83/uploads/goods/2020-04-17/5e99603f3361e.png"
                ],
                "is_process": 0,
                "process_note": null,
                "process_time": null,
                "created_at": "2020-06-06 17:44:25",
                "updated_at": "2020-06-06 17:42:54"
            }
        ],
        "first_page_url": "http://192.168.1.173:83/module/chickenshop/user/getComplainList?page=1",
        "from": 1,
        "last_page": 1,
        "last_page_url": "http://192.168.1.173:83/module/chickenshop/user/getComplainList?page=1",
        "next_page_url": null,
        "path": "http://192.168.1.173:83/module/chickenshop/user/getComplainList",
        "per_page": 15,
        "prev_page_url": null,
        "to": 1,
        "total": 1
    }
}

投诉详情

GET {{base_url}}/user/getComplainDetail

Query

参数名 类型 必需 描述 示例
id string 1

Header

参数名 类型 必需 描述 示例
Authorization string 1 bearer {{token}}

返回示例

{
    "status": 200,
    "msg": "success",
    "data": {
        "id": 1,
        "shop_name": "一号店",
        "uid": 14,
        "phone": "18617004850",
        "realname": "易鑫",
        "reason": "原因",
        "contents": "内容",
        "imgs": [
            "http://192.168.1.173:83/uploads/goods/2020-04-17/5e99603f3361e.png"
        ],
        "is_process": 0,
        "process_note": null,
        "process_time": null,
        "created_at": "2020-06-06 17:44:25",
        "updated_at": "2020-06-06 17:42:54"
    }
}

提交投诉

POST {{base_url}}/user/addComplain

Header

参数名 类型 必需 描述 示例
Authorization string 1 bearer {{token}}

Body

参数名 类型 必需 描述 示例
phone string 1 手机
realname string 0 姓名
reason string 1 投诉原因
contents string 1 投诉内容
imgs[0] string 1 图片数组
shop_name string 1

返回示例

{
    "status": 200,
    "msg": "success",
    "data": null
}

平台协议

获取协议列表

GET {{base_url}}/getAgreementList

返回示例

{
    "status": 200,
    "msg": "success",
    "data": [
        {
            "id": 1,
            "title": "注册协议",
            "content": "<h1 style=\"text-align: center;\">注册协议</h1><p><br></p>",
            "cid": 1,
            "create_at": "2020-03-11 14:47:56",
            "update_at": "2020-03-11 14:47:56",
            "seo_keywords": "注册协议",
            "seo_description": "注册协议"
        },
        {
            "id": 2,
            "title": "隐私协议",
            "content": "<h1 style=\"text-align: center;\">隐私协议</h1>",
            "cid": 2,
            "create_at": "2020-03-11 14:48:25",
            "update_at": "2020-03-11 14:48:25",
            "seo_keywords": "隐私协议",
            "seo_description": "隐私协议"
        },
        {
            "id": 3,
            "title": "申请条款",
            "content": "<h1 style=\"text-align: center;\">申请条款  </h1><p><br></p>",
            "cid": 3,
            "create_at": "2020-04-10 18:03:55",
            "update_at": "2020-04-10 18:03:55",
            "seo_keywords": "申请条款",
            "seo_description": "申请条款"
        }
    ]
}

获取协议详情

GET {{base_url}}/getAgreementDetail

Query

参数名 类型 必需 描述 示例
id string 1

返回示例

{
    "status": 200,
    "msg": "success",
    "data": {
        "id": 1,
        "title": "注册协议",
        "content": "<h1 style=\"text-align: center;\">注册协议</h1><p><br></p>",
        "cid": 1,
        "create_at": "2020-03-11 14:47:56",
        "update_at": "2020-03-11 14:47:56",
        "seo_keywords": "注册协议",
        "seo_description": "注册协议"
    }
}

意见反馈

提交反馈

POST {{base_url}}/user/addAdvice

Header

参数名 类型 必需 描述 示例
Authorization string 1 bearer {{token}}

Body

参数名 类型 必需 描述 示例
phone string 1 手机
realname string 0 姓名
contents string 1 反馈内容
imgs[0] string 1 图片数组

反馈详情

GET {{base_url}}/user/getAdviceDetail

Query

参数名 类型 必需 描述 示例
id string 1

Header

参数名 类型 必需 描述 示例
Authorization string 1 bearer {{token}}

反馈列表

GET {{base_url}}/user/getAdviceList

Header

参数名 类型 必需 描述 示例
Authorization string 1 bearer {{token}}

店铺

优惠券

获取我的优惠券历史记录

GET {{base_url}}/shop/getMyCouponHistory

Query

参数名 类型 必需 描述 示例
type string 1

Header

参数名 类型 必需 描述 示例
Authorization string 1

领取店铺优惠券

POST {{base_url}}/shop/getCoupon

Header

参数名 类型 必需 描述 示例
Authorization string 1

Body

参数名 类型 必需 描述 示例
coupon_id string 1

返回示例

{
    "status": 200,
    "msg": "领取成功",
    "data": {
        "can_get_num": 0
    }
}

获取我的优惠券列表

GET {{base_url}}/shop/getMyCouponList

Header

参数名 类型 必需 描述 示例
Authorization string 1

返回示例

{
    "status": 200,
    "msg": "success",
    "data": [
        {
            "id": 11,
            "coupon_id": 1,
            "uid": 14,
            "used_time": null,
            "get_time": "2020-05-29 17:01:27",
            "use_status": 1,
            "order_id": 0,
            "start_time": "2020-05-29 17:01:27",
            "end_time": "2020-06-01 17:01:27",
            "created_at": "2020-05-29 17:01:27",
            "updated_at": "2020-05-29 17:01:27",
            "coupon": {
                "coupon_id": 1,
                "shop_id": 2,
                "shop_type": 1,
                "use_money": 10,
                "reduce_money": 10,
                "term_of_validity": 3,
                "get_num": 1,
                "status": 1,
                "create_at": "2020-04-20 11:08:12",
                "update_at": 1587352092,
                "shop": {
                    "shop_id": 2,
                    "shop_name": "便利店(布吉店)",
                    "shop_logo": "http://chicken.com/uploads/shop_logo/2020-04-15/5e96a157593d6.png",
                    "shop_type": 1
                }
            }
        }
    ]
}

获取店铺优惠券

GET {{base_url}}/shop/getCouponList

Query

参数名 类型 必需 描述 示例
shop_id string 1 店铺ID(不传获取所有优惠券) 1
shop_type string 1 店铺类型 【1=便利店,2=美食店】
shop_name string 1 店铺名称

Header

参数名 类型 必需 描述 示例
Authorization string 1 bearer {{token}}

返回示例

{
    "status": 200,
    "msg": "success",
    "data": [
        {
            "coupon_id": 1,
            "shop_id": 1,
            "shop_type": 1,
            "use_money": 20,
            "reduce_money": 10,
            "term_of_validity": 3,
            "get_num": 2,
            "status": 1,
            "created_at": "2020-04-20 11:08:12",
            "updated_at": "2020-06-06 10:18:51",
            "user_coupons_count": 0,
            "shop": {
                "shop_id": 1,
                "shop_name": "便利店(爱联店)",
                "shop_logo": "https://weike.union-home.cn/uploads/shop_logo/2020-06-06/5edb7280ec9d0.png",
                "shop_type": 1,
                "shop_type_name": "便利店"
            }
        },
        {
            "coupon_id": 2,
            "shop_id": 1,
            "shop_type": 1,
            "use_money": 20,
            "reduce_money": 15,
            "term_of_validity": 1,
            "get_num": 0,
            "status": 1,
            "created_at": "2020-04-20 11:08:24",
            "updated_at": null,
            "user_coupons_count": 0,
            "shop": {
                "shop_id": 1,
                "shop_name": "便利店(爱联店)",
                "shop_logo": "https://weike.union-home.cn/uploads/shop_logo/2020-06-06/5edb7280ec9d0.png",
                "shop_type": 1,
                "shop_type_name": "便利店"
            }
        },
        {
            "coupon_id": 3,
            "shop_id": 1,
            "shop_type": 1,
            "use_money": 10,
            "reduce_money": 5,
            "term_of_validity": 1,
            "get_num": 0,
            "status": 1,
            "created_at": "2020-04-20 11:09:50",
            "updated_at": null,
            "user_coupons_count": 0,
            "shop": {
                "shop_id": 1,
                "shop_name": "便利店(爱联店)",
                "shop_logo": "https://weike.union-home.cn/uploads/shop_logo/2020-06-06/5edb7280ec9d0.png",
                "shop_type": 1,
                "shop_type_name": "便利店"
            }
        },
        {
            "coupon_id": 4,
            "shop_id": 1,
            "shop_type": 1,
            "use_money": 30,
            "reduce_money": 10,
            "term_of_validity": 3,
            "get_num": 0,
            "status": 1,
            "created_at": "2020-04-20 11:10:06",
            "updated_at": null,
            "user_coupons_count": 0,
            "shop": {
                "shop_id": 1,
                "shop_name": "便利店(爱联店)",
                "shop_logo": "https://weike.union-home.cn/uploads/shop_logo/2020-06-06/5edb7280ec9d0.png",
                "shop_type": 1,
                "shop_type_name": "便利店"
            }
        },
        {
            "coupon_id": 7,
            "shop_id": 1,
            "shop_type": 1,
            "use_money": 100,
            "reduce_money": 50,
            "term_of_validity": 1,
            "get_num": 0,
            "status": 1,
            "created_at": "2020-04-20 15:21:25",
            "updated_at": null,
            "user_coupons_count": 0,
            "shop": {
                "shop_id": 1,
                "shop_name": "便利店(爱联店)",
                "shop_logo": "https://weike.union-home.cn/uploads/shop_logo/2020-06-06/5edb7280ec9d0.png",
                "shop_type": 1,
                "shop_type_name": "便利店"
            }
        },
        {
            "coupon_id": 11,
            "shop_id": 1,
            "shop_type": 1,
            "use_money": 30,
            "reduce_money": 15,
            "term_of_validity": 1,
            "get_num": 0,
            "status": 1,
            "created_at": "2020-04-20 16:13:00",
            "updated_at": null,
            "user_coupons_count": 0,
            "shop": {
                "shop_id": 1,
                "shop_name": "便利店(爱联店)",
                "shop_logo": "https://weike.union-home.cn/uploads/shop_logo/2020-06-06/5edb7280ec9d0.png",
                "shop_type": 1,
                "shop_type_name": "便利店"
            }
        },
        {
            "coupon_id": 12,
            "shop_id": 1,
            "shop_type": 1,
            "use_money": 100,
            "reduce_money": 10,
            "term_of_validity": 3,
            "get_num": 0,
            "status": 1,
            "created_at": "2020-06-01 10:42:25",
            "updated_at": null,
            "user_coupons_count": 0,
            "shop": {
                "shop_id": 1,
                "shop_name": "便利店(爱联店)",
                "shop_logo": "https://weike.union-home.cn/uploads/shop_logo/2020-06-06/5edb7280ec9d0.png",
                "shop_type": 1,
                "shop_type_name": "便利店"
            }
        },
        {
            "coupon_id": 14,
            "shop_id": 7,
            "shop_type": 2,
            "use_money": 0,
            "reduce_money": 5,
            "term_of_validity": 3,
            "get_num": 0,
            "status": 1,
            "created_at": "2020-06-03 11:11:39",
            "updated_at": "2020-06-03 11:11:39",
            "user_coupons_count": 0,
            "shop": {
                "shop_id": 7,
                "shop_name": "首尔炸鸡",
                "shop_logo": "https://weike.union-home.cn/uploads/shop_logo/2020-05-06/5eb22df5986fc.png",
                "shop_type": 2,
                "shop_type_name": "美食店"
            }
        }
    ]
}
参数名 类型 描述
data.shop object
data.term_of_validity number
data.user_coupons_count number
### 下单结算

下单页面查询是否有可用优惠

POST {{base_url}}/cart/getUseableDiscounts

Header

参数名 类型 必需 描述 示例
Authorization string 1 bearer {{token}}

Body

参数名 类型 必需 描述 示例
shop_id string 1 1
cart_ids[0] string 1 177
cart_ids[1] string 1 178
cart_ids[2] string 1 179

返回示例

{
    "status": 200,
    "msg": "success",
    "data": {
        "useable_coupons": [
            {
                "id": 11,
                "coupon_id": 1,
                "uid": 14,
                "used_time": null,
                "get_time": "2020-05-29 17:01:27",
                "use_status": 1,
                "order_id": 0,
                "start_time": "2020-05-29 17:01:27",
                "end_time": "2020-06-07 17:01:27",
                "created_at": "2020-05-29 17:01:27",
                "updated_at": "2020-05-29 17:01:27",
                "coupon": {
                    "coupon_id": 1,
                    "shop_id": 0,
                    "shop_type": 1,
                    "use_money": 20,
                    "reduce_money": 10,
                    "term_of_validity": 3,
                    "get_num": 1,
                    "status": 1,
                    "create_at": "2020-04-20 11:08:12",
                    "update_at": 1587352092
                }
            }
        ]
    }
}

生成下单数据

POST {{base_url}}/cart/generateOrderData

Header

参数名 类型 必需 描述 示例
Authorization string 1 bearer {{token}}

Body

参数名 类型 必需 描述 示例
shop_id string 1 1
cart_ids string 1 177
cart_ids[1] string 1 178
cart_ids[2] array 1 179
dispatch_type string 0 取餐方式 1配送 2自取 1
coupon_id string 0 优惠券ID 11

返回示例

{
    "status": 200,
    "msg": "success",
    "data": {
        "carts": [
            {
                "id": 182,
                "uid": 14,
                "shop_id": 1,
                "goods_id": 2,
                "goods_name": "奥尔良鸡翅",
                "goods_img": "http://192.168.1.173:83/uploads/goods/2020-04-15/5e96e87b772cc.png",
                "goods_num": 1,
                "goods_price": "10.00",
                "goods_packing": "0.00",
                "goods_status": 1,
                "created_at": "2020-06-01 16:59:59",
                "updated_at": "2020-06-01 16:59:59"
            }
        ],
        "shop": {
            "shop_id": 1,
            "shop_name": "便利店(爱联店)",
            "shop_logo": "http://192.168.1.173:83/uploads/shop_logo/2020-04-15/5e96870366015.png",
            "send_goods_time": 0,
            "distribution_fee": 2,
            "shop_type_name": null
        },
        "dispatch_money": 2,
        "packing": 0,
        "original_goods_money": "10.00",
        "goods_money": "5.00",
        "full_reduction": {
            "full_id": 1,
            "shop_id": 1,
            "shop_type": 1,
            "use_money": 10,
            "reduce_money": 5,
            "status": 1,
            "created_at": "2020-04-17 17:39:23",
            "updated_at": null
        },
        "full_reduction_money": 5,
        "order_money": 12,
        "discounts_money": 5,
        "actual_money": 7,
        "user_address": {
            "address_id": 10,
            "uid": 14,
            "username": "nianwang",
            "phone": "18617004851",
            "region": "广东省 深圳市 龙岗区",
            "address": "龙岗街道志联佳大厦222",
            "is_default": 1,
            "create_at": "2020-06-02",
            "update_at": 1591079851
        }
    }
}
参数名 类型 描述
data.full_reduction object
data.carts array
data.full_reduction_money number
data.discounts_money number
#### 下单
`
POST {{base_url}}/cart/storeOrder
`

Header

参数名 类型 必需 描述 示例
Authorization string 1 bearer {{token}}

Body

参数名 类型 必需 描述 示例
shop_id string 1 店铺ID 1
cart_ids[0] string 1 购物车ID数组 177
cart_ids[1] string 1 178
cart_ids[2] string 1 179
coupon_id string 0 用户优惠券ID 11
user_note string 0 备注
dispatch_type string 1 取餐方式 1配送 2自取 1
address_id string 0 用户地址ID(取餐方式为1时必填)
fetch_time string 1 取餐时间

返回示例

{
    "status": 200,
    "msg": "下单成功",
    "data": {
        "shop_id": "1",
        "order_no": "od1591002130442635",
        "dispatch_type": "2",
        "dispatch_money": 0,
        "packing": 0,
        "order_time": "2020-06-01 17:02:10",
        "dispatch_address": " ",
        "contacts_name": null,
        "phone": null,
        "goods_money": "13.00",
        "order_money": "13.00",
        "user_note": "",
        "fetch_time": "2020-06-01 17:02:10",
        "fetch_code": "MJ1591002130442978",
        "full_reduction": {
            "full_id": 1,
            "shop_id": 1,
            "shop_type": 1,
            "use_money": 10,
            "reduce_money": 5,
            "status": 1,
            "create_at": "2020-04-17 17:39:23",
            "update_at": 1587115548
        },
        "full_reduction_money": 5,
        "actual_money": "8.00",
        "uid": 14,
        "updated_at": "2020-06-01 17:02:10",
        "created_at": "2020-06-01 17:02:10",
        "order_id": 3
    }
}
参数名 类型 描述
data.actual_money number
data.order_money number
#### 订单支付
`
POST {{base_url}}/cart/orderPay
`

Header

参数名 类型 必需 描述 示例
Authorization string 1 bearer {{token}}

Body

参数名 类型 必需 描述 示例
order_id string 1 订单ID 3
pay_type string 1 支付方式 1

返回示例

{
    "status": 200,
    "msg": "success",
    "data": {
        "appid": "wxd65a13300ecaae03",
        "partnerid": "1523813651",
        "prepayid": "wx08135150098849a4abeb8b0e1466020400",
        "package": "Sign=WXPay",
        "noncestr": "ip5ad8rlgfpc87wzqe8qbrextnv03d2h",
        "timestamp": "1591595501",
        "sign": "368AB3015D16FF27C594FE4F014CD1A9"
    }
}

店铺列表

GET {{base_url}}/shop/getShopList

Query

参数名 类型 必需 描述 示例
shop_type string 1 店铺类型 1便利店 2炸鸡店 1
longitude string 1 114.041523
latitude string 1 22.613933
orderBy string 1

返回示例

{
    "status": 200,
    "msg": "success",
    "data": {
        "current_page": 1,
        "data": [
            {
                "shop_id": 5,
                "shop_type": 1,
                "shop_name": "便利店(深圳北站店)",
                "shop_logo": "shop_logo/2020-05-06/5eb22df5986fc.png",
                "star": "5.0",
                "monthly_sale": 0,
                "exceed_money_send_goods": 0,
                "distribution_fee": 0,
                "distribution_fee_old": 0,
                "send_goods_time": 0,
                "distance": 628.9751768893381
            },
            {
                "shop_id": 2,
                "shop_type": 1,
                "shop_name": "便利店(布吉店)",
                "shop_logo": "shop_logo/2020-04-15/5e96a157593d6.png",
                "star": "5.0",
                "monthly_sale": 0,
                "exceed_money_send_goods": 0,
                "distribution_fee": 0,
                "distribution_fee_old": 0,
                "send_goods_time": 0,
                "distance": 9152.53476294389
            },
            {
                "shop_id": 1,
                "shop_type": 1,
                "shop_name": "便利店(爱联店)",
                "shop_logo": "shop_logo/2020-04-15/5e96870366015.png",
                "star": "4.9",
                "monthly_sale": 0,
                "exceed_money_send_goods": 0,
                "distribution_fee": 0,
                "distribution_fee_old": 0,
                "send_goods_time": 0,
                "distance": 23422.09725770025
            },
            {
                "shop_id": 7,
                "shop_type": 1,
                "shop_name": "首尔炸鸡",
                "shop_logo": "user/shop/2020-04-03/5e86e98314220.png",
                "star": "5.0",
                "monthly_sale": 0,
                "exceed_money_send_goods": 0,
                "distribution_fee": 0,
                "distribution_fee_old": 0,
                "send_goods_time": 0,
                "distance": 36559.48128881148
            },
            {
                "shop_id": 6,
                "shop_type": 1,
                "shop_name": "好吃不胖炸鸡店",
                "shop_logo": "shop_logo/2020-05-28/5ecf74a943f77.jpg",
                "star": "5.0",
                "monthly_sale": 0,
                "exceed_money_send_goods": 0,
                "distribution_fee": 0,
                "distribution_fee_old": 0,
                "send_goods_time": 0,
                "distance": 1942625.852778939
            }
        ],
        "first_page_url": "http://chicken.com/module/chickenshop/shop/getShopList?page=1",
        "from": 1,
        "last_page": 1,
        "last_page_url": "http://chicken.com/module/chickenshop/shop/getShopList?page=1",
        "next_page_url": null,
        "path": "http://chicken.com/module/chickenshop/shop/getShopList",
        "per_page": 15,
        "prev_page_url": null,
        "to": 5,
        "total": 5
    }
}

店铺详情

GET {{base_url}}/shop/getShopDetail

Query

参数名 类型 必需 描述 示例
shop_id string 1 店铺ID 1
longitude string 1 114.041523
latitude string 1 22.613933

返回示例

{
    "status": 200,
    "msg": "success",
    "data": {
        "shop_id": 1,
        "phone": "13113692222",
        "shop_type": 1,
        "shop_name": "便利店(爱联店)",
        "shop_logo": "http://192.168.1.173:83/uploads/shop_logo/2020-04-15/5e96870366015.png",
        "shop_address": "广东省深圳市龙岗区蒲排路12号",
        "longitude": "114.248498",
        "latitude": "22.702749",
        "star": "4.9",
        "monthly_sale": 0,
        "exceed_money_send_goods": 0,
        "distribution_fee": 2,
        "distribution_fee_old": 0,
        "send_goods_time": 0,
        "shop_notices": "店铺公告店铺公告",
        "distance": 23422.09725770025,
        "full_reductions": [
            {
                "full_id": 1,
                "shop_id": 1,
                "shop_type": 1,
                "use_money": 10,
                "reduce_money": 5,
                "status": 1,
                "created_at": "2020-04-17 17:39:23",
                "updated_at": null
            },
            {
                "full_id": 4,
                "shop_id": 1,
                "shop_type": 1,
                "use_money": 20,
                "reduce_money": 10,
                "status": 1,
                "created_at": "2020-04-17 17:39:23",
                "updated_at": null
            },
            {
                "full_id": 6,
                "shop_id": 1,
                "shop_type": 1,
                "use_money": 60,
                "reduce_money": 15,
                "status": 1,
                "created_at": "2020-06-01 13:45:22",
                "updated_at": null
            },
            {
                "full_id": 7,
                "shop_id": 1,
                "shop_type": 1,
                "use_money": 100,
                "reduce_money": 30,
                "status": 1,
                "created_at": "2020-06-01 13:50:11",
                "updated_at": null
            }
        ]
    }
}

返回参数

参数名 类型 描述
data.phone string 电话
data.shop_type number
data.shop_name string 名称
data.shop_logo string LOGO
data.shop_address string 地址
data.star string 星级
data.monthly_sale number 月售
data.exceed_money_send_goods number 多少钱起送
data.distribution_fee number 现配送费
data.distribution_fee_old number 原配送费
data.send_goods_time number 送货时间(分钟)
data.shop_notices string 店铺公告
data.distance number 距离
#### 获取店铺商品列表
`
GET {{base_url}}/shop/getShopGoodsList
`

Query

参数名 类型 必需 描述 示例
shop_id string 1 店铺ID 1
cate_id string 1 分类id 3
shop_type string 1 店铺类型 1
goods_name string 0 商品关键字 单人套餐

返回示例

{
    "status": 200,
    "msg": "success",
    "data": {
        "current_page": 1,
        "data": [
            {
                "goods_id": 1,
                "uid": 4,
                "library_id": 0,
                "shop_id": 1,
                "shop_type": 2,
                "cate_id": "1,3",
                "bar_code": "A000000001",
                "goods_name": "香辣鸡翅",
                "goods_logo": "goods/2020-04-15/5e96e85c35f1c.jpg",
                "goods_tags": null,
                "price": "10.00",
                "price_old": "10.00",
                "num": 100,
                "monthly_sale": 0,
                "goods_describe": "",
                "status": 1,
                "create_at": "2020-04-15 00:00:00",
                "update_at": 1586948188
            },
            {
                "goods_id": 2,
                "uid": 4,
                "library_id": 0,
                "shop_id": 1,
                "shop_type": 2,
                "cate_id": "1,3",
                "bar_code": "A000000002",
                "goods_name": "奥尔良鸡翅",
                "goods_logo": "goods/2020-04-15/5e96e87b772cc.png",
                "goods_tags": null,
                "price": "10.00",
                "price_old": "10.00",
                "num": 100,
                "monthly_sale": 0,
                "goods_describe": "",
                "status": 1,
                "create_at": "2020-04-15 00:00:00",
                "update_at": 1586948219
            }
        ],
        "first_page_url": "http://chicken.com/module/chickenshop/shop/getShopGoods?page=1",
        "from": 1,
        "last_page": 1,
        "last_page_url": "http://chicken.com/module/chickenshop/shop/getShopGoods?page=1",
        "next_page_url": null,
        "path": "http://chicken.com/module/chickenshop/shop/getShopGoods",
        "per_page": 15,
        "prev_page_url": null,
        "to": 2,
        "total": 2
    }
}

获取店铺商品详情

GET {{base_url}}/shop/getShopGoodsDetail

Query

参数名 类型 必需 描述 示例
goods_id string 1 店铺ID 1

返回示例

{
    "status": 200,
    "msg": "success",
    "data": {
        "goods_id": 1,
        "uid": 4,
        "library_id": 0,
        "shop_id": 1,
        "shop_type": 2,
        "cate_id": "1,3",
        "bar_code": "A000000001",
        "goods_name": "香辣鸡翅",
        "goods_logo": "goods/2020-04-15/5e96e85c35f1c.jpg",
        "goods_tags": null,
        "price": "10.00",
        "price_old": "10.00",
        "num": 100,
        "monthly_sale": 0,
        "goods_describe": "",
        "status": 1,
        "create_at": "2020-04-15 00:00:00",
        "update_at": 1586948188
    }
}

获取店铺分类

GET {{base_url}}/shop/getShopCategorys

Query

参数名 类型 必需 描述 示例
shop_id string 1 店铺类型 1便利店 2炸鸡店 1

返回示例

{
    "status": 200,
    "msg": "success",
    "data": [
        {
            "cate_id": 1,
            "shop_id": 1,
            "type": 2,
            "name": "人气热卖",
            "logo": "",
            "orders": 0,
            "status": 1,
            "pid": 0,
            "pid_all_path": "",
            "create_at": 1586932658,
            "update_at": 1586936743
        },
        {
            "cate_id": 2,
            "shop_id": 1,
            "type": 2,
            "name": "单人套餐",
            "logo": "",
            "orders": 0,
            "status": 1,
            "pid": 0,
            "pid_all_path": "",
            "create_at": 1586932744,
            "update_at": 1586936805
        },
        {
            "cate_id": 3,
            "shop_id": 1,
            "type": 2,
            "name": "主食套餐",
            "logo": "",
            "orders": 0,
            "status": 1,
            "pid": 0,
            "pid_all_path": "",
            "create_at": 1586932758,
            "update_at": 1586937056
        },
        {
            "cate_id": 4,
            "shop_id": 1,
            "type": 2,
            "name": "汉堡薯条",
            "logo": "",
            "orders": 0,
            "status": 1,
            "pid": 0,
            "pid_all_path": "",
            "create_at": 1586932778,
            "update_at": 1586937043
        },
        {
            "cate_id": 10,
            "shop_id": 1,
            "type": 2,
            "name": "饮品",
            "logo": "",
            "orders": 0,
            "status": 1,
            "pid": 0,
            "pid_all_path": "",
            "create_at": 1586934202,
            "update_at": 1586937100
        },
        {
            "cate_id": 13,
            "shop_id": 1,
            "type": 1,
            "name": "零食",
            "logo": "",
            "orders": 0,
            "status": 1,
            "pid": 0,
            "pid_all_path": "",
            "create_at": 1587111171,
            "update_at": 1587111171
        },
        {
            "cate_id": 14,
            "shop_id": 1,
            "type": 1,
            "name": "饮品",
            "logo": "",
            "orders": 0,
            "status": 1,
            "pid": 0,
            "pid_all_path": "",
            "create_at": 1587111179,
            "update_at": 1587111179
        }
    ]
}

获取验证码

注册获取验证码

GET {{base_url}}/getCode?getType=1&amp;phone=13592836171&amp;key=ef485ac55cea23958ec57b15c92963b3

Query

参数名 类型 必需 描述 示例
getType string 1 1
phone string 1 13592836171
key string 1 chickenshop2020041513113690000 ef485ac55cea23958ec57b15c92963b3

忘记密码获取验证码

GET {{base_url}}/getCode

Query

参数名 类型 必需 描述 示例
getType string 1 3
phone string 1 13592836171
key string 1 chickenshop2020033013113690000 3594e43bdd9cecdbbded40eda8e8b228

手机号认证获取验证码

GET {{base_url}}/getCode?getType=9&amp;phone=13113690000&amp;key=8393a05e636ca0f72d741bd926b810cf

Query

参数名 类型 必需 描述 示例
getType string 1 9
phone string 1 13113690000
key string 1 chickenshop2020033013113690000 8393a05e636ca0f72d741bd926b810cf

登录注册

注册用户

POST {{base_url}}/register

Body

参数名 类型 必需 描述 示例
phone string 1 13113691111
code string 1 123456

返回示例

{
    "status": 200,
    "msg": "注册成功",
    "data": {
        "uid": 21,
        "avatar": "http://192.168.1.173:83/uploads/avatar/avatar.jpg",
        "c_code": "",
        "phone": "18617004856",
        "email": "",
        "username": "186170048568972",
        "male": "",
        "birthday": "",
        "nickname": "",
        "type": "member",
        "phone_active": 1,
        "email_active": 0,
        "status": 1,
        "create_at": "2020-06-05 10:37:35",
        "update_at": "2020-06-05 10:37:35",
        "change_username": 0,
        "pid": 1,
        "pid_path": "",
        "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjIxLCJpc3MiOiJodHRwOi8vMTkyLjE2OC4xLjE3Mzo4My9tb2R1bGUvY2hpY2tlbnNob3AvcmVnaXN0ZXIiLCJpYXQiOjE1OTEzMjQ2NTUsImV4cCI6MTU5NjUwODY1NSwibmJmIjoxNTkxMzI0NjU1LCJqdGkiOiI5bFhjaG9hRWZZQTFxMjlmIn0.rs_i_TFYGC1pM_lumEVd7Ht-kGsbDP9A1x1avCpaFXk",
        "set_password": true
    }
}

登录接口

POST {{base_url}}/login

Body

参数名 类型 必需 描述 示例
phone string 1 13113690000
password string 1 123456
login_type string 1 1

返回示例

{
    "status": 200,
    "msg": "登录成功",
    "data": {
        "uid": 20,
        "avatar": "http://chicken.com/uploads/avatar/avatar.jpg",
        "c_code": "",
        "phone": "18617004855",
        "email": "",
        "username": "186170048551505",
        "male": "",
        "birthday": "",
        "nickname": "",
        "password": "5c6e137076c893662fc50b68fc6005e2",
        "type": "member",
        "phone_active": 1,
        "email_active": 0,
        "gid": "",
        "status": 1,
        "create_at": "2020-06-03 09:42:11",
        "update_at": "2020-06-03 09:42:11",
        "change_username": 0,
        "pid": 1,
        "pid_path": "",
        "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjIwLCJpc3MiOiJodHRwOi8vY2hpY2tlbi5jb20vbW9kdWxlL2NoaWNrZW5zaG9wL2xvZ2luIiwiaWF0IjoxNTkxMTQ4NjA3LCJleHAiOjE1OTYzMzI2MDcsIm5iZiI6MTU5MTE0ODYwNywianRpIjoiUWdTcldSdFZKc3JCeHJhWCJ9.U7RS4UT8dLHMSs2dPY7x7db630bNFZJ5_DTFMRfeoAU",
        "set_password": false
    }
}

忘记密码,验证码登录

POST {{base_url}}/forgetCodeLogin

Body

参数名 类型 必需 描述 示例
phone string 1 13113690000
code string 1 648391

第三方登录【无绑定】

POST {{base_url}}/threeLogin

Body

参数名 类型 必需 描述 示例
three_tig string 1 wx_app
openid string 1 o52aJwMmRJE9MfCAD19ok0o61234

返回示例

{
    "status": 200,
    "msg": "成功",
    "data": {
        "bind_status": false
    }
}

第三方登录【有绑定】

POST {{base_url}}/threeLogin

Body

参数名 类型 必需 描述 示例
three_tig string 1 wx_app
openid string 1 o52aJwMmRJE9MfCAD19ok0o61234

返回示例

{
    "status": 200,
    "msg": "登录成功",
    "data": {
        "uid": 2,
        "avatar": "http://chicken.com/uploads/avatar/avatar.jpg",
        "c_code": "",
        "phone": "13113690000",
        "email": "",
        "username": "131****0000",
        "male": "",
        "birthday": "",
        "nickname": "",
        "password": "5c6e137076c893662fc50b68fc6005e2",
        "type": "member",
        "phone_active": 1,
        "email_active": 0,
        "gid": "",
        "status": 1,
        "create_at": "2020-03-31 10:53:09",
        "update_at": "2020-03-31 10:53:09",
        "change_username": 0,
        "pid": 1,
        "pid_path": "",
        "bind_status": true,
        "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjIsImlzcyI6Imh0dHA6Ly9jaGlja2VuLmNvbS9tb2R1bGUvY2hpY2tlbnNob3AvdGhyZWVMb2dpbiIsImlhdCI6MTU4NTczNzE1NCwiZXhwIjoxNTg1NzgwMzU0LCJuYmYiOjE1ODU3MzcxNTQsImp0aSI6IlpnQkJYOEZ0bWhQdkZLYzEifQ.SJDZ3ggg7VLoGtsW5mGm_a0Ok6m0mUH_xS1Mb2xAbnQ",
        "set_password": false
    }
}

退出

POST {{base_url}}/logout

第三方注册

POST {{base_url}}/threeRegisterAndBind

Body

参数名 类型 必需 描述 示例
phone string 1 手机号码 13113692222
code string 1 手机验证码 336982
three_tig string 1 第三方标识(wx_app:微信APP) wx_app
openid string 1 openid kevinwMmRJE9MfCAD19ok0o61234

第三方注册和绑定获取验证码

GET {{base_url}}/getCode

Query

参数名 类型 必需 描述 示例
getType string 1 7
phone string 1 13113692222
key string 1 chickenshop2020033013113690000 8393a05e636ca0f72d741bd926b810cf

第三方绑定

POST {{base_url}}/threeRegisterAndBind

Body

参数名 类型 必需 描述 示例
phone string 1 13113691111
code string 1 993939
three_tig string 1 wx_app
openid string 1 kevinwMmRJE9MfCAD19ok0o61234

修改登录密码

POST {{base_url}}/updatePassword

Body

参数名 类型 必需 描述 示例
password string 1 13113691111
phone string 1
code string 1

返回示例

{
    "status": 200,
    "msg": "修改成功",
    "data": null
}

设置登录密码

POST {{base_url}}/setPassword

Header

参数名 类型 必需 描述 示例
Authorization string 1

Body

参数名 类型 必需 描述 示例
password string 1 13113691111

返回示例

{
    "status": 200,
    "msg": "success",
    "data": null
}

用户信息

更新用户信息

注册或者忘记密码设置密码

POST {{base_url}}/updateUserInfo

Body

参数名 类型 必需 描述 示例
update_type string 1 6
password string 1 123456

获取用户信息

GET {{base_url}}/getUserInfo

Header

参数名 类型 必需 描述 示例
Authorization string 1

返回示例

{
    "status": 200,
    "msg": "获取成功",
    "data": {
        "uid": 21,
        "avatar": "http://192.168.1.173:83/uploads/avatar/avatar.jpg",
        "c_code": "",
        "phone": "18617004856",
        "email": "",
        "username": "186170048568972",
        "male": "",
        "birthday": null,
        "nickname": "",
        "type": "member",
        "phone_active": 1,
        "email_active": 0,
        "status": 1,
        "create_at": "2020-06-05 10:37:55",
        "update_at": "2020-06-05 10:37:55",
        "change_username": 0,
        "pid": 1,
        "pid_path": ""
    }
}

地址

获取地址列表

GET {{base_url}}/address/getAddressList

Header

参数名 类型 必需 描述 示例
Authorization string 1 bearer {{token}}

返回示例

{
    "status": 200,
    "msg": "成功",
    "data": [
        {
            "address_id": 10,
            "username": "nianwang",
            "phone": "18617004851",
            "region": "广东省 深圳市 龙岗区",
            "address": "龙岗街道志联佳大厦222",
            "is_default": 1
        },
        {
            "address_id": 9,
            "username": "nianwang",
            "phone": "18617004850",
            "region": "广东省 深圳市 龙岗区",
            "address": "龙岗街道志联佳大厦",
            "is_default": 0
        }
    ]
}

获取地址信息接口

GET {{base_url}}/address/getAddress

Query

参数名 类型 必需 描述 示例
address_id string 1 3

Header

参数名 类型 必需 描述 示例
Authorization string 1

返回示例

{
    "status": 200,
    "msg": "成功",
    "data": {
        "address_id": 10,
        "username": "nianwang",
        "phone": "18617004851",
        "region": "广东省 深圳市 龙岗区",
        "address": "龙岗街道志联佳大厦222",
        "is_default": 1
    }
}

添加地址

POST {{base_url}}/address/addressSubmit

Header

参数名 类型 必需 描述 示例
Authorization string 1

Body

参数名 类型 必需 描述 示例
username string 1 kevin
phone string 1 13113690000
region string 1 广东省 深圳市 龙岗区
address string 1 龙岗街道志联佳大厦
is_default string 1 1

返回示例

{
    "status": 200,
    "msg": "添加成功"
}

编辑地址

POST {{base_url}}/address/addressSubmit

Header

参数名 类型 必需 描述 示例
Authorization string 1

Body

参数名 类型 必需 描述 示例
username string 1 kevin
phone string 1 13113690000
region string 1 广东省 深圳市 龙岗区
address string 1 龙岗街道志联佳大厦222
is_default string 1 1
address_id string 1 16

返回示例

{
    "status": 200,
    "msg": "更新成功"
}

删除地址

POST {{base_url}}/address/addressDelete

Header

参数名 类型 必需 描述 示例
Authorization string 1

Body

参数名 类型 必需 描述 示例
address_id string 1 16

设置默认地址

POST {{base_url}}/address/setDefaultAddress

Header

参数名 类型 必需 描述 示例
Authorization string 1

Body

参数名 类型 必需 描述 示例
address_id string 1 11

系统消息

获取消息未读条数

GET {{base_url}}/message/getMessageCount

Header

参数名 类型 必需 描述 示例
Authorization string 1 bearer {{token}}

返回示例

{
    "status": 200,
    "msg": "success",
    "data": {
        "systemMessage": 2,
        "orderMessage": 0,
        "count": 2
    }
}

返回参数

参数名 类型 描述
data.count number 总条数
data.orderMessage number 订单通知
data.systemMessage number 系统消息
#### 获取系统消息列表
`
GET {{base_url}}/message/getSystemMessageList
`

Header

参数名 类型 必需 描述 示例
Authorization string 1 bearer {{token}}

返回示例

{
    "status": 200,
    "msg": "success",
    "data": {
        "current_page": 1,
        "data": [
            {
                "id": 2,
                "title": "店铺审核结果",
                "content": "恭喜你,店铺审核已通过; ",
                "uid": 1,
                "receive_uid": 14,
                "status": 0,
                "created_at": "2020-05-28 17:20:22",
                "updated_at": "2020-05-28 17:20:22"
            },
            {
                "id": 1,
                "title": "资质认证审核结果",
                "content": "恭喜你,企业认证已通过; 恭喜你,身份证认证已通过; 恭喜你,企业认证已通过; ",
                "uid": 1,
                "receive_uid": 14,
                "status": 0,
                "created_at": "2020-05-28 17:19:08",
                "updated_at": "2020-05-28 17:19:08"
            }
        ],
        "first_page_url": "http://chicken.com/module/chickenshop/message/getSystemMessageList?page=1",
        "from": 1,
        "last_page": 1,
        "last_page_url": "http://chicken.com/module/chickenshop/message/getSystemMessageList?page=1",
        "next_page_url": null,
        "path": "http://chicken.com/module/chickenshop/message/getSystemMessageList",
        "per_page": 15,
        "prev_page_url": null,
        "to": 2,
        "total": 2
    }
}

获取系统信息详情并标记已读

GET {{base_url}}/message/readSystemMessage

Query

参数名 类型 必需 描述 示例
id string 1

Header

参数名 类型 必需 描述 示例
Authorization string 1 bearer {{token}}

返回示例

{
    "status": 200,
    "msg": "更新成功",
    "data": {
        "id": 2,
        "title": "店铺审核结果",
        "content": "恭喜你,店铺审核已通过; ",
        "uid": 1,
        "receive_uid": 14,
        "status": 1,
        "created_at": "2020-06-03 15:01:25",
        "updated_at": "2020-06-03 15:01:25"
    }
}

返回参数

参数名 类型 描述
data.count number 总条数
data.orderMessage number 订单通知
data.systemMessage number 系统消息
#### 系统消息一键已读
`
GET {{base_url}}/message/batchReadMessage
`

Header

参数名 类型 必需 描述 示例
Authorization string 1 bearer {{token}}

返回示例

{
    "status": 200,
    "msg": "success",
    "data": null
}

删除消息

DELETE {{base_url}}/message/deleteSystemMessage

Query

参数名 类型 必需 描述 示例
id string 1

Header

参数名 类型 必需 描述 示例
Authorization string 1

返回示例

{
    "status": 200,
    "msg": "删除成功",
    "data": []
}

获取订单通知列表

GET {{base_url}}/message/getRemindMessageList

Query

参数名 类型 必需 描述 示例
type string 1

Header

参数名 类型 必需 描述 示例
Authorization string 1 bearer {{token}}

签到

签到接口

POST {{base_url}}/signin/add

Header

参数名 类型 必需 描述 示例
Authorization string 1

返回示例

{
    "status": 200,
    "msg": "签到成功",
    "data": {
        "now_integral": 9006,
        "add_integral": 3,
        "continuous": 3,
        "all_sign_in_num": 3
    }
}

获取积分明细列表

GET {{base_url}}/signin/getIntegralRecordList

Query

参数名 类型 必需 描述 示例
page string 1 1
pagesize string 1 10
time string 1 2020-03
type string 1 1

Header

参数名 类型 必需 描述 示例
Authorization string 1 bearer {{token}}

返回示例

{
    "status": 200,
    "msg": "获取成功",
    "data": [
        {
            "type": 2,
            "integral": -1000,
            "remark": "兑换积分商品",
            "day": "2020-06-04 10:22:14"
        }
    ]
}

签到信息接口

GET {{base_url}}/signin/getInfo

Header

参数名 类型 必需 描述 示例
Authorization string 1

返回示例

{
    "status": 200,
    "msg": "查询成功",
    "data": {
        "integral": 1,
        "sign_in_status": true,
        "all_sign_in_num": 1,
        "today": "2020-06-02",
        "list": [
            {
                "day": "2020-06-02",
                "addtime": 1591079945
            }
        ]
    }
}

商家

收款账户

收款账户详情

GET {{base_url}}/payment/1

Header

参数名 类型 必需 描述 示例
Authorization string 1

返回示例

{
    "status": 200,
    "msg": "success",
    "data": {
        "id": 1,
        "uid": 14,
        "pay_type": "alipay",
        "bank_name": null,
        "is_default": 1,
        "real_name": "易鑫",
        "card_no": "35184347894",
        "open_bank": null,
        "code_img": null,
        "created_at": "2020-06-04 17:37:06",
        "updated_at": "2020-06-04 17:37:06"
    }
}

修改收款账户

POST {{base_url}}/payment/1

Header

参数名 类型 必需 描述 示例
Authorization string 1

Body

参数名 类型 必需 描述 示例
pay_type string 1 账户类型 alipay
real_name string 1 姓名 易鑫
card_no string 1 支付宝账户或者银行卡号 35184347894
is_default string 0 是否默认收款方式(0非默认 1默认) 1
bank_name string 0 银行名称(添加银行卡才填)
open_bank string 0 支行(添加银行卡才填)
_method string 1 模拟PUT请求必填参数取值put put

返回示例

{
    "status": 200,
    "msg": "修改成功",
    "data": null
}

添加收款账户

POST {{base_url}}/payment

Header

参数名 类型 必需 描述 示例
Authorization string 1

Body

参数名 类型 必需 描述 示例
pay_type string 1 账户类型 alipay
real_name string 1 姓名 易鑫
card_no string 1 支付宝账户或者银行卡号 35184347894
is_default string 0 是否默认收款方式(0非默认 1默认) 1
bank_name string 0 银行名称(添加银行卡才填)
open_bank string 0 支行(添加银行卡才填)

返回示例

{
    "status": 200,
    "msg": "添加成功",
    "data": null
}

删除收款账户

DELETE {{base_url}}/payment/2

Header

参数名 类型 必需 描述 示例
Authorization string 1

获取收款账户列表

GET {{base_url}}/payment

Header

参数名 类型 必需 描述 示例
Authorization string 1

返回示例

{
    "status": 200,
    "msg": "success",
    "data": [
        {
            "id": 1,
            "uid": 14,
            "pay_type": "alipay",
            "bank_name": null,
            "is_default": 1,
            "real_name": "易鑫",
            "card_no": "35184347894",
            "open_bank": null,
            "code_img": null,
            "created_at": "2020-06-04 17:37:06",
            "updated_at": "2020-06-04 17:37:06"
        }
    ]
}

订单

订单确认完成

POST {{base_url}}/shop/confirmOrder

Header

参数名 类型 必需 描述 示例
Authorization string 1

Body

参数名 类型 必需 描述 示例
shop_type string 1
order_id string 1

获取店铺订单详情

GET {{base_url}}/shop/orderDetail

Query

参数名 类型 必需 描述 示例
shop_type string 1
order_id string 1

Header

参数名 类型 必需 描述 示例
Authorization string 1

获取店铺订单列表

GET {{base_url}}/shop/orderList

Query

参数名 类型 必需 描述 示例
shop_type string 1

Header

参数名 类型 必需 描述 示例
Authorization string 1

店铺管理

店铺商品列表

GET {{base_url}}/shop/getShoperGoods

Query

参数名 类型 必需 描述 示例
shop_type string 1 店铺类型 2
cate_id string 1 商品分类ID 1

Header

参数名 类型 必需 描述 示例
Authorization string 1 bearer {{token}}

Body

参数名 类型 必需 描述 示例
shop_type string 1 1

返回示例

{
    "status": 200,
    "msg": "success",
    "data": {
        "current_page": 1,
        "data": [
            {
                "goods_id": 6,
                "uid": 14,
                "library_id": 0,
                "shop_id": 7,
                "shop_type": 2,
                "cate_id": "1,3",
                "bar_code": "A000000002",
                "goods_name": "奥尔良鸡翅",
                "goods_logo": "http://chicken.com/uploads/goods/2020-04-15/5e96e87b772cc.png",
                "goods_tags": null,
                "price": "10.00",
                "price_old": "10.00",
                "packing": "0.00",
                "num": 100,
                "monthly_sale": 0,
                "sales": null,
                "goods_describe": "",
                "status": 1,
                "create_at": "2020-04-15 00:00:00",
                "update_at": 1586948219,
                "shop": {
                    "shop_id": 7,
                    "shop_name": "首尔炸鸡"
                }
            }
        ],
        "first_page_url": "http://chicken.com/module/chickenshop/shop/getShoperGoods?page=1",
        "from": 1,
        "last_page": 1,
        "last_page_url": "http://chicken.com/module/chickenshop/shop/getShoperGoods?page=1",
        "next_page_url": null,
        "path": "http://chicken.com/module/chickenshop/shop/getShoperGoods",
        "per_page": 15,
        "prev_page_url": null,
        "to": 1,
        "total": 1
    }
}

获取店铺商品分类

GET {{base_url}}/shop/getShopCate

Query

参数名 类型 必需 描述 示例
shop_type string 1 店铺类型 2

Header

参数名 类型 必需 描述 示例
Authorization string 1 bearer {{token}}

Body

参数名 类型 必需 描述 示例
shop_type string 1 1

店铺满减–列表

GET {{base_url}}/shop/fullReduction

Query

参数名 类型 必需 描述 示例
shop_type string 1 店铺类型 2

Header

参数名 类型 必需 描述 示例
Authorization string 1 bearer {{token}}

Body

参数名 类型 必需 描述 示例
shop_type string 1 1

返回示例

{
    "status": 200,
    "msg": "success",
    "data": [
        {
            "full_id": 8,
            "shop_id": 7,
            "shop_type": 2,
            "use_money": 10,
            "reduce_money": 2,
            "status": 1,
            "created_at": "2020-06-03 10:50:24",
            "updated_at": "2020-06-03 10:51:11"
        }
    ]
}

店铺满减–详情

GET {{base_url}}/shop/fullReduction/8

Query

参数名 类型 必需 描述 示例
shop_type string 1

Header

参数名 类型 必需 描述 示例
Authorization string 1 bearer {{token}}

Body

参数名 类型 必需 描述 示例
shop_type string 1 1
use_money string 1
reduce_money string 1
_method string 1

返回示例

{
    "status": 200,
    "msg": "success",
    "data": {
        "full_id": 8,
        "shop_id": 7,
        "shop_type": 2,
        "use_money": 10,
        "reduce_money": 2,
        "status": 1,
        "created_at": "2020-06-03 10:50:24",
        "updated_at": "2020-06-03 10:51:11"
    }
}

店铺满减–添加

POST {{base_url}}/shop/fullReduction

Header

参数名 类型 必需 描述 示例
Authorization string 1 bearer {{token}}

Body

参数名 类型 必需 描述 示例
shop_type string 1 1
use_money string 1
reduce_money string 1

返回示例

{
    "status": 200,
    "msg": "添加成功",
    "data": null
}

店铺满减–修改

POST {{base_url}}/shop/fullReduction/8

Header

参数名 类型 必需 描述 示例
Authorization string 1 bearer {{token}}

Body

参数名 类型 必需 描述 示例
shop_type string 1 1
use_money string 1
reduce_money string 1
_method string 1

返回示例

{
    "status": 200,
    "msg": "修改成功",
    "data": null
}

店铺满减–删除

DELETE {{base_url}}/shop/fullReduction/8

Query

参数名 类型 必需 描述 示例
shop_type string 1

Header

参数名 类型 必需 描述 示例
Authorization string 1 bearer {{token}}

返回示例

{
    "status": 200,
    "msg": "success",
    "data": null
}

店铺优惠券–修改

POST {{base_url}}/shop/coupon/8

Header

参数名 类型 必需 描述 示例
Authorization string 1 bearer {{token}}

Body

参数名 类型 必需 描述 示例
shop_type string 1 1
use_money string 1
reduce_money string 1
term_of_validity string 1
_method string 1

店铺优惠券–添加

POST {{base_url}}/shop/coupon

Header

参数名 类型 必需 描述 示例
Authorization string 1 bearer {{token}}

Body

参数名 类型 必需 描述 示例
shop_type string 1 1
use_money string 1
reduce_money string 1
term_of_validity string 1

返回示例

{
    "status": 200,
    "msg": "添加成功",
    "data": null
}

编辑店铺公告

POST {{base_url}}/shop/setShopNotice

Header

参数名 类型 必需 描述 示例
Authorization string 1 bearer {{token}}

Body

参数名 类型 必需 描述 示例
shop_type string 1 1
shop_notices string 1

返回示例

{
    "status": 200,
    "msg": "修改成功",
    "data": null
}

店铺优惠券–删除

DELETE {{base_url}}/shop/coupon/8

Query

参数名 类型 必需 描述 示例
shop_type string 1

Header

参数名 类型 必需 描述 示例
Authorization string 1 bearer {{token}}

商品入库

POST {{base_url}}/shop/storeGoods

Header

参数名 类型 必需 描述 示例
Authorization string 1 bearer {{token}}

Body

参数名 类型 必需 描述 示例
shop_type string 1 店铺类型 2
goods_data[0][bar_code] string 1
goods_data[0][num] string 1

返回示例

{
    "status": 200,
    "msg": "商品入库完成",
    "data": null
}

根据商品编码获取商品信息

GET {{base_url}}/shop/getGoodsByBarcode

Query

参数名 类型 必需 描述 示例
shop_type string 1 店铺类型 2
bar_code string 1 商品分类ID 1

Header

参数名 类型 必需 描述 示例
Authorization string 1 bearer {{token}}

Body

参数名 类型 必需 描述 示例
shop_type string 1 1

返回示例

{
    "status": 200,
    "msg": "success",
    "data": {
        "library_id": 4,
        "shop_type": 1,
        "cate_id": "16",
        "bar_code": "6922858211077",
        "goods_name": "百事可乐",
        "goods_logo": "goods/2020-04-17/5e99657739027.png",
        "price": "3.00",//零售价
        "price_old": "3.00",
        "purchase_price": "3.00",//采购价
        "goods_describe": "",
        "status": 1,
        "create_at": "2020-04-17 16:14:47",
        "update_at": 1588930430
    }
}

获取店铺公告

GET {{base_url}}/shop/getShopNotice

Query

参数名 类型 必需 描述 示例
shop_type string 1 店铺类型 2

Header

参数名 类型 必需 描述 示例
Authorization string 1 bearer {{token}}

Body

参数名 类型 必需 描述 示例
shop_type string 1 1

返回示例

{
    "status": 200,
    "msg": "success",
    "data": {
        "shop_notices": "店铺公告内容店铺公告内容店铺公告内容"
    }
}

店铺设置

POST {{base_url}}/shop/shopSet

Header

参数名 类型 必需 描述 示例
Authorization string 1 bearer {{token}}

Body

参数名 类型 必需 描述 示例
shop_type string 1 1
shop_logo string 0 user/shop/2020-04-03/5e86e98314220.png
shop_describe string 0
shop_address string 0
longitude string 0
latitude string 0
shop_time string 0
exceed_money_send_goods string 0
send_goods_time string 0
distribution_fee string 0
distribution_fee_old string 0
shop_notices string 0
shop_status string 0

详细说明

`shop_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',

 `uid` int(11) NOT NULL COMMENT '用户uid',

 `phone` varchar(11) NOT NULL DEFAULT '' COMMENT '手机号',

 `shop_name` varchar(20) NOT NULL DEFAULT '' COMMENT '店铺名称',

 `shop_logo` varchar(255) NOT NULL DEFAULT '' COMMENT '店铺logo',

 `shop_type` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '店铺类目【1=便利店,2=炸鸡店】',

 `shop_describe` varchar(255) NOT NULL DEFAULT '' COMMENT '店铺简介',

 `shop_address` varchar(50) NOT NULL DEFAULT '' COMMENT '店铺地址',

 `longitude` varchar(20) NOT NULL DEFAULT '0' COMMENT '经度',

 `latitude` varchar(20) NOT NULL DEFAULT '0' COMMENT '维度',

 `shop_status` tinyint(1) DEFAULT '0' COMMENT '店铺状态【0=待开店,1=开店,2=暂停营业】',

 `shop_time` varchar(30) DEFAULT '' COMMENT '营业时间段',

 `order_expiration_time` int(5) DEFAULT '0' COMMENT '订单过期时间',

 `receipt_order_setting` tinyint(1) DEFAULT '1' COMMENT '接单设置【1=自动接单,2=手动接单】',

 `star` decimal(2,1) DEFAULT '5.0' COMMENT '评价,初始为5',

 `monthly_sale` int(11) DEFAULT '0' COMMENT '月售',

 `exceed_money_send_goods` int(4) DEFAULT '0' COMMENT '多少钱起送',

 `send_goods_time` tinyint(4) DEFAULT '0' COMMENT '送货时间(分钟)',

 `distribution_fee` tinyint(4) DEFAULT '0' COMMENT '现配送费',

 `distribution_fee_old` tinyint(4) DEFAULT '0' COMMENT '原配送费',

 `shop_notices` varchar(255) DEFAULT '' COMMENT '店铺公告',

 `status` tinyint(1) DEFAULT '0' COMMENT '审核状态【0=待审核,1=审核通过,2=审核不通过】',

 `msg` varchar(255) DEFAULT '' COMMENT '审核信息',

 `create_at` date DEFAULT NULL COMMENT '开店时间',

 `update_at` int(11) DEFAULT '0' COMMENT '更新时间',

 `is_recommend` tinyint(1) DEFAULT '0' COMMENT '是否推荐 【0=不推荐,1=推荐】',

店铺优惠券–详情

GET {{base_url}}/shop/coupon/8

Query

参数名 类型 必需 描述 示例
shop_type string 1

Header

参数名 类型 必需 描述 示例
Authorization string 1 bearer {{token}}

Body

参数名 类型 必需 描述 示例
shop_type string 1 1
use_money string 1
reduce_money string 1
_method string 1

店铺优惠券–列表

GET {{base_url}}/shop/coupon

Query

参数名 类型 必需 描述 示例
shop_type string 1 店铺类型 2

Header

参数名 类型 必需 描述 示例
Authorization string 1 bearer {{token}}

Body

参数名 类型 必需 描述 示例
shop_type string 1 1

返回示例

{
    "status": 200,
    "msg": "success",
    "data": [
        {
            "coupon_id": 14,
            "shop_id": 7,
            "shop_type": 2,
            "use_money": 0,
            "reduce_money": 5,
            "term_of_validity": 3,
            "get_num": 0,
            "status": 1,
            "created_at": "2020-06-03 11:11:39",
            "updated_at": "2020-06-03 11:11:39"
        }
    ]
}
参数名 类型 描述
data.shop_id number
data.shop_type number
data.use_money number
data.reduce_money number
data.term_of_validity number
data.status number
### 店铺营收

店铺营收首页

GET {{base_url}}/wallet/shopWalletCenter

Header

参数名 类型 必需 描述 示例
Authorization string 1

返回示例

{
    "status": 200,
    "msg": "success",
    "data": {
        "id": 18,
        "uid": 14,
        "all_balance": "0.00",
        "all_withdrawal_balance": "0.00",
        "balance": "0.00",
        "integral": 9006,
        "created_at": null,
        "updated_at": "2020-06-04 10:31:27"
    }
}

提现明细

GET {{base_url}}/wallet/getWithdrawalLogs

Header

参数名 类型 必需 描述 示例
Authorization string 1

店铺收支明细

GET {{base_url}}/wallet/getWalletLogs

Header

参数名 类型 必需 描述 示例
Authorization string 1

提现

POST {{base_url}}/wallet/storeWithdrawal

Header

参数名 类型 必需 描述 示例
Authorization string 1

Body

参数名 类型 必需 描述 示例
user_payment_id string 1
withdrawal_amount string 1

我的

个人中心【未开店】

GET {{base_url}}/merchantUserInfo

Header

参数名 类型 必需 描述 示例
Authorization string 1

返回示例

{
    "status": 200,
    "msg": "获取成功",
    "data": {
        "shop_set_up_shop_status": false,
        "shop_logo": "",
        "shop_name": "",
        "shop_user_type": "",
        "shop_status": "",
        "shop_time": "",
        "goods_num": 0
    }
}

上传文件

POST {{base_url}}/uploadFile

Body

参数名 类型 必需 描述 示例
dir string 1 idcard
file string 1

认证

提交企业认证

POST {{base_url}}/addQualificationsInfo

Header

参数名 类型 必需 描述 示例
Authorization string 1

Body

参数名 类型 必需 描述 示例
type string 1 1
enterprise_name string 1 企业名称1
business_license_no string 1 456789132132
business_license_no_img string 1 user/business/2020-04-02/5e85ad834b506.jpg

返回示例

{
    "status": 200,
    "msg": "提交成功",
    "data": []
}

提交法人认证

POST {{base_url}}/addQualificationsInfo

Header

参数名 类型 必需 描述 示例
Authorization string 1

Body

参数名 类型 必需 描述 示例
type string 1 2
id_card_number string 1 425211199001101010
card_positive_img string 1 user/idcard/2020-04-02/5e85b337324e0.jpg
card_back_img string 1 user/idcard/2020-04-02/5e85b3489bdc9.jpg

返回示例

{
    "status": 200,
    "msg": "提交成功",
    "data": []
}

提交手机号认证

POST {{base_url}}/addQualificationsInfo

Header

参数名 类型 必需 描述 示例
Authorization string 1

Body

参数名 类型 必需 描述 示例
type string 1 3
phone string 1 13113692222
code string 1 570917

返回示例

{
    "status": 200,
    "msg": "提交成功",
    "data": []
}

获取认证信息【未认证】

GET {{base_url}}/getQualificationsInfo

Header

参数名 类型 必需 描述 示例
Authorization string 1

返回示例

{
    "status": 200,
    "msg": "获取成功",
    "data": {
        "enterprise_name": "企业名称333",
        "business_license_no": "456789132132",
        "business_license_no_img": "user/business/2020-04-02/5e85ad834b506.jpg",
        "business_status": 1,
        "business_msg": "请填写企业的基本认证信息",
        "business_status_msg": "已认证",
        "id_card_number": "425211199001101033",
        "card_positive_img": "user/idcard/2020-04-02/5e85b337324e0.jpg",
        "card_back_img": "user/idcard/2020-04-02/5e85b3489bdc9.jpg",
        "card_status": 1,
        "card_msg": "请上传企业法人的身份证信息",
        "card_status_msg": "已认证",
        "phone": "18617004852",
        "phone_status": 1,
        "phone_msg": "请认证企业注册时填写的手机号码",
        "phone_status_msg": "已认证"
    }
}

获取认证信息【提交认证】

GET {{base_url}}/getQualificationsInfo

Header

参数名 类型 必需 描述 示例
Authorization string 1

返回示例

{
    "status": 200,
    "msg": "获取成功",
    "data": {
        "enterprise_name": "企业名称333",
        "business_license_no": "456789132132",
        "business_license_no_img": "user/business/2020-04-02/5e85ad834b506.jpg",
        "business_status": 1,
        "business_msg": "请填写企业的基本认证信息",
        "business_status_msg": "已认证",
        "id_card_number": "425211199001101033",
        "card_positive_img": "user/idcard/2020-04-02/5e85b337324e0.jpg",
        "card_back_img": "user/idcard/2020-04-02/5e85b3489bdc9.jpg",
        "card_status": 1,
        "card_msg": "请上传企业法人的身份证信息",
        "card_status_msg": "已认证",
        "phone": "18617004852",
        "phone_status": 1,
        "phone_msg": "请认证企业注册时填写的手机号码",
        "phone_status_msg": "已认证"
    }
}

开店设置

获取开店信息【未开店】

POST {{base_url}}/shop/getShopInfo

提交开店信息

POST {{base_url}}/shop/editShop

Header

参数名 类型 必需 描述 示例
Authorization string 1

Body

参数名 类型 必需 描述 示例
phone string 1 13113691111
shop_name string 1 便利炸鸡1
shop_logo string 1 user/shop/2020-04-03/5e86e98314220.png
shop_type string 1 1,2
shop_describe string 1 便利炸鸡
shop_address string 1 深圳市龙岗区鹤呜东路46号
longitude string 1 114.342236
latitude string 1 22.790406

返回示例

{
    "status": 200,
    "msg": "提交成功",
    "data": []
}

获取开店信息【提交开店信息】

POST {{base_url}}/shop/getShopInfo

获取开店信息【开店】

GET {{base_url}}/merchantUserInfo

获取我的店铺

GET {{base_url}}/shop/getMyShop

Header

参数名 类型 必需 描述 示例
Authorization string 1

返回示例

{
    "status": 200,
    "msg": "success",
    "data": [
        {
            "shop_id": 8,
            "uid": 14,
            "phone": "18617004852",
            "shop_name": "记得便利店",
            "shop_logo": "user/shop/2020-04-03/5e86e98314220.png",
            "shop_type": 1,
            "shop_describe": "记得便利店",
            "shop_address": "深圳市龙岗区鹤呜东路488号",
            "longitude": "114.342236",
            "latitude": "22.790406",
            "shop_status": 1,
            "shop_time": "8:00 - 21:00",
            "order_expiration_time": 30,
            "receipt_order_setting": 1,
            "star": "5.0",
            "monthly_sale": 0,
            "exceed_money_send_goods": 0,
            "send_goods_time": 0,
            "distribution_fee": 0,
            "distribution_fee_old": 0,
            "shop_notices": null,
            "status": 1,
            "msg": "",
            "create_at": "2020-05-28",
            "is_recommend": 0
        },
        {
            "shop_id": 7,
            "uid": 14,
            "phone": "18617004852",
            "shop_name": "首尔炸鸡",
            "shop_logo": "user/shop/2020-04-03/5e86e98314220.png",
            "shop_type": 2,
            "shop_describe": "首尔炸鸡",
            "shop_address": "深圳市龙岗区鹤呜东路488号",
            "longitude": "114.342236",
            "latitude": "22.790406",
            "shop_status": 1,
            "shop_time": "8:00 - 21:00",
            "order_expiration_time": 30,
            "receipt_order_setting": 1,
            "star": "5.0",
            "monthly_sale": 0,
            "exceed_money_send_goods": 0,
            "send_goods_time": 0,
            "distribution_fee": 0,
            "distribution_fee_old": 0,
            "shop_notices": null,
            "status": 1,
            "msg": "",
            "create_at": "2020-05-28",
            "is_recommend": 0
        }
    ]
}

获取商家信息

GET {{base_url}}/shop/getUserShop

Query

参数名 类型 必需 描述 示例
shop_type string 0 不传默认1 1

Header

参数名 类型 必需 描述 示例
Authorization string 1 bearer {{token}}

返回示例

{
    "status": 200,
    "msg": "success",
    "data": {
        "uid": 14,
        "avatar": "http://192.168.1.173:83/uploads/avatar/avatar.jpg",
        "c_code": "",
        "phone": "18617004851",
        "email": "",
        "username": "186170048517501",
        "male": "",
        "birthday": null,
        "nickname": "",
        "type": "merchant",
        "phone_active": 1,
        "email_active": 0,
        "status": 1,
        "create_at": "2020-06-12 10:56:14",
        "update_at": "2020-06-12 10:56:14",
        "change_username": 0,
        "pid": 0,
        "pid_path": "",
        "invite_code": "66666613",
        "shop_type": "2",
        "shop": {
            "shop_id": 7,
            "uid": 14,
            "phone": "18617004852",
            "shop_name": "首尔炸鸡",
            "shop_logo": "http://192.168.1.173:83/uploads/shop_logo/2020-05-06/5eb22df5986fc.png",
            "shop_type": 2,
            "shop_describe": "首尔炸鸡",
            "shop_address": "深圳市龙岗区鹤呜东路488号",
            "longitude": "114.342236",
            "latitude": "22.790406",
            "shop_status": 1,
            "shop_time": "8:00 - 21:00",
            "order_expiration_time": 30,
            "receipt_order_setting": 1,
            "star": "5.0",
            "monthly_sale": 0,
            "exceed_money_send_goods": 0,
            "send_goods_time": 0,
            "distribution_fee": 0,
            "distribution_fee_old": 0,
            "shop_notices": "店铺公告内容店铺公告内容店铺公告内容",
            "status": 1,
            "msg": "",
            "create_at": "2020-05-28",
            "is_recommend": 0,
            "shop_type_name": "美食店",
            "shop_status_name": "营业中"
        },
        "shop_goods_count": 2
    }
}

返回参数

参数名 类型 描述
data.shop object 店铺信息
data.shop_goods_count number 店铺商品数量
data.shop.shop_time string 营业时间段
## 视频

上传文件

POST {{base_url}}/uploadFile

Header

参数名 类型 必需 描述 示例
Authorization string 1

Body

参数名 类型 必需 描述 示例
dir string 1 video
file string 1

返回示例

{
    "status": 200,
    "msg": "上传成功",
    "data": {
        "file_url": "user/video/2020-06-04/5ed85cde1c091.jpg",
        "file_view_url": "http://chicken.com/uploads/user/video/2020-06-04/5ed85cde1c091.jpg"
    }
}

用户发布视频

POST {{base_url}}/video/submitVideo

Header

参数名 类型 必需 描述 示例
Authorization string 1

Body

参数名 类型 必需 描述 示例
title string 1 测试视频标题4
content string 1 测试视频内容4
video string 1 user/video/2020-04-27/5ea642cfc0cd3.mp4

商户发布视频

POST {{base_url}}/submitVideo

Header

参数名 类型 必需 描述 示例
Authorization string 1

Body

参数名 类型 必需 描述 示例
title string 1 测试视频标题1
content string 1 测试视频内容1
video string 1 user/video/2020-04-27/5ea642cfc0cd3.mp4
pay_method string 1 WeChat
pay_type string 1 pc

返回示例

{
    "status": 200,
    "msg": "下单成功",
    "data": {
        "trade_type": "NATIVE",
        "prepay_id": "wx041028391914143e6859a3f51183116800",
        "code_url": "weixin://wxpay/bizpayurl?pr=IMSpkcB"
    }
}

删除视频

POST {{base_url}}/video/deleteVideo

Header

参数名 类型 必需 描述 示例
Authorization string 1

Body

参数名 类型 必需 描述 示例
ids string 1 8,9

增加视频播放量

POST {{base_url}}/video/addVideoPlayNum

Header

参数名 类型 必需 描述 示例
Authorization string 1

Body

参数名 类型 必需 描述 示例
video_id string 1 4

返回示例

{
    "status": 200,
    "msg": "操作成功",
    "data": []
}

视频评论接口

POST {{base_url}}/video/videoComment

Header

参数名 类型 必需 描述 示例
Authorization string 1

Body

参数名 类型 必需 描述 示例
video_id string 1 4
content string 1 评论4的1

返回示例

{
    "status": 200,
    "msg": "评论成功"
}

评论点赞/取消点赞

POST {{base_url}}/video/videoCommentPoint

Header

参数名 类型 必需 描述 示例
Authorization string 1

Body

参数名 类型 必需 描述 示例
video_id string 1 4
comment_id string 1 16

返回示例

{
    "status": 0,
    "msg": "点赞失败"
}

删除视频评论

POST {{base_url}}/video/deleteVideoComment

Header

参数名 类型 必需 描述 示例
Authorization string 1

Body

参数名 类型 必需 描述 示例
video_id string 1 4
comment_id string 1 16

获取视频评论列表

GET {{base_url}}/video/getVideoComment

Query

参数名 类型 必需 描述 示例
video_id string 1 4
page string 1 1
pagesize string 1 10

Header

参数名 类型 必需 描述 示例
Authorization string 1

返回示例

{
    "status": 200,
    "msg": "获取成功",
    "data": [
        {
            "comment_id": 18,
            "video_id": 4,
            "content": "评论4的2",
            "points_num": "0",
            "create_at": "2020-04-28 18:44:52",
            "avatar": "http://chicken.com/uploads/avatar/avatar.jpg",
            "username": "131136911112377",
            "nickname": "",
            "com_point_id": false
        },
        {
            "comment_id": 17,
            "video_id": 4,
            "content": "评论4的1",
            "points_num": "1",
            "create_at": "2020-04-28 18:44:51",
            "avatar": "http://chicken.com/uploads/avatar/avatar.jpg",
            "username": "131136900009445",
            "nickname": "",
            "com_point_id": false
        }
    ]
}

视频点赞

POST {{base_url}}/video/videoPoint

Header

参数名 类型 必需 描述 示例
Authorization string 1

Body

参数名 类型 必需 描述 示例
video_id string 1 12

返回示例

{
    "status": 200,
    "msg": "点赞成功"
}

用户获取视频列表

POST {{base_url}}/video/userGetVideoList

Query

参数名 类型 必需 描述 示例
page string 1 1
pagesize string 1 10

Header

参数名 类型 必需 描述 示例
Authorization string 1

返回示例

{
    "status": 200,
    "msg": "获取成功",
    "data": [
        {
            "video_id": 13,
            "video": "http://chicken.com/uploads/user/video/2020-04-27/5ea642cfc0cd3.mp4",
            "title": "测试视频标题1",
            "content": "测试视频内容1",
            "play_num": "999 ",
            "thumbs_up_num": "1",
            "comment_num": "0",
            "avatar": "http://chicken.com/uploads/avatar/2020-04-15/5e96730b30860.jpg",
            "username": "test2",
            "nickname": "test2",
            "shop_id": true,
            "point_id": false
        },
        {
            "video_id": 12,
            "video": "http://chicken.com/uploads/user/video/2020-04-27/5ea642cfc0cd3.mp4",
            "title": "测试视频标题1",
            "content": "测试视频内容1",
            "play_num": "0",
            "thumbs_up_num": "1",
            "comment_num": "0",
            "avatar": "http://chicken.com/uploads/avatar/2020-04-15/5e96730b30860.jpg",
            "username": "test2",
            "nickname": "test2",
            "shop_id": true,
            "point_id": false
        },
        {
            "video_id": 11,
            "video": "http://chicken.com/uploads/user/video/2020-04-27/5ea642cfc0cd3.mp4",
            "title": "测试视频标题2",
            "content": "测试视频内容2",
            "play_num": "0",
            "thumbs_up_num": "0",
            "comment_num": "0",
            "avatar": "http://chicken.com/uploads/avatar/2020-04-15/5e96730b30860.jpg",
            "username": "test2",
            "nickname": "test2",
            "shop_id": true,
            "point_id": false
        },
        {
            "video_id": 10,
            "video": "http://chicken.com/uploads/user/video/2020-04-27/5ea642cfc0cd3.mp4",
            "title": "测试视频标题1",
            "content": "测试视频内容1",
            "play_num": "0",
            "thumbs_up_num": "0",
            "comment_num": "0",
            "avatar": "http://chicken.com/uploads/avatar/2020-04-15/5e96730b30860.jpg",
            "username": "test2",
            "nickname": "test2",
            "shop_id": true,
            "point_id": false
        },
        {
            "video_id": 7,
            "video": "http://chicken.com/uploads/user/video/2020-04-27/5ea642cfc0cd3.mp4",
            "title": "测试视频标题4",
            "content": "测试视频内容4",
            "play_num": "0",
            "thumbs_up_num": "0",
            "comment_num": "0",
            "avatar": "http://chicken.com/uploads/avatar/2020-04-15/5e96734abc6a5.jpg",
            "username": "test2001",
            "nickname": "test2001",
            "shop_id": false,
            "point_id": false
        },
        {
            "video_id": 6,
            "video": "http://chicken.com/uploads/user/video/2020-04-27/5ea642cfc0cd3.mp4",
            "title": "测试视频标题3",
            "content": "测试视频内容3",
            "play_num": "0",
            "thumbs_up_num": "0",
            "comment_num": "0",
            "avatar": "http://chicken.com/uploads/avatar/2020-04-15/5e96734abc6a5.jpg",
            "username": "test2001",
            "nickname": "test2001",
            "shop_id": false,
            "point_id": false
        },
        {
            "video_id": 5,
            "video": "http://chicken.com/uploads/user/video/2020-04-27/5ea642cfc0cd3.mp4",
            "title": "测试视频标题2",
            "content": "测试视频内容2",
            "play_num": "0",
            "thumbs_up_num": "0",
            "comment_num": "0",
            "avatar": "http://chicken.com/uploads/avatar/2020-04-15/5e96734abc6a5.jpg",
            "username": "test2001",
            "nickname": "test2001",
            "shop_id": false,
            "point_id": false
        },
        {
            "video_id": 4,
            "video": "http://chicken.com/uploads/user/video/2020-04-27/5ea642cfc0cd3.mp4",
            "title": "测试视频标题",
            "content": "测试视频内容",
            "play_num": "8",
            "thumbs_up_num": "1",
            "comment_num": "1",
            "avatar": "http://chicken.com/uploads/avatar/2020-04-15/5e96734abc6a5.jpg",
            "username": "test2001",
            "nickname": "test2001",
            "shop_id": false,
            "point_id": false
        },
        {
            "video_id": 1,
            "video": "http://chicken.com/uploads/video/2020-04-20/1.mp4",
            "title": "视频标题1",
            "content": "视频标题1",
            "play_num": "5",
            "thumbs_up_num": "0",
            "comment_num": "0",
            "avatar": "http://chicken.com/uploads/avatar/avatar.jpg",
            "username": "131136900009445",
            "nickname": "",
            "shop_id": false,
            "point_id": false
        },
        {
            "video_id": 2,
            "video": "http://chicken.com/uploads/video/2020-04-20/2.mp4",
            "title": "视频标题2",
            "content": "视频标题2",
            "play_num": "999 ",
            "thumbs_up_num": "100",
            "comment_num": "100",
            "avatar": "http://chicken.com/uploads/avatar/avatar.jpg",
            "username": "131136911112377",
            "nickname": "",
            "shop_id": false,
            "point_id": false
        }
    ]
}

获取自己发布的视频列表

GET {{base_url}}/video/getReleaseVideoList

Query

参数名 类型 必需 描述 示例
page string 1 1
pagesize string 1 10

Header

参数名 类型 必需 描述 示例
Authorization string 1

返回示例

{
    "status": 200,
    "msg": "获取成功",
    "data": []
}

积分

用户积分页

GET {{base_url}}/getUserIntegral

Header

参数名 类型 必需 描述 示例
Authorization string 1

返回示例

{
    "status": 200,
    "msg": "获取成功",
    "data": {
        "user_integral": 1,
        "integral_goods_list": [
            {
                "goods_id": 2,
                "goods_name": "钢铁侠模型",
                "goods_logo": "http://chicken.com/uploads/integral_goods/2020-04-20/5e9d6c4e883f4.jpg",
                "integral": 2000,
                "num": 100
            },
            {
                "goods_id": 1,
                "goods_name": "钢铁侠模型",
                "goods_logo": "http://chicken.com/uploads/integral_goods/2020-04-20/5e9d696b69460.jpg",
                "integral": 1000,
                "num": 1000
            }
        ]
    }
}

获取积分商城商品列表

GET {{base_url}}/getIntegralGoodsList

Query

参数名 类型 必需 描述 示例
page string 1 1
pagesize string 1 1

返回示例

{
    "status": 200,
    "msg": "获取成功",
    "data": [
        {
            "goods_id": 5,
            "goods_name": "汽车模型",
            "goods_logo": "http://chicken.com/uploads/integral_goods/2020-04-29/5ea925d73309d.jpg",
            "integral": 1000,
            "num": 9
        }
    ]
}

积分商品兑换接口

POST {{base_url}}/exchangeIntegralGoods

Header

参数名 类型 必需 描述 示例
Authorization string 1

Body

参数名 类型 必需 描述 示例
goods_id string 1 4
num string 1 1
address_id string 1 2

返回示例

{
    "status": 0,
    "msg": "兑换成功",
    "data": {
        "order_id": 11
    }
}

兑换积分商品订单列表

GET {{base_url}}/integralGoodsOrderList

Query

参数名 类型 必需 描述 示例
page string 1 1
pagesize string 1 1

Header

参数名 类型 必需 描述 示例
Authorization string 1

返回示例

{
    "status": 200,
    "msg": "获取成功",
    "data": [
        {
            "order_id": 11,
            "goods_logo": "http://chicken.com/uploads/integral_goods/2020-04-29/5ea925c556b27.jpg",
            "goods_name": "汽车模型",
            "integral": 1000,
            "pay_status": "已兑换"
        }
    ]
}

兑换积分商品订单详情

GET {{base_url}}/integralGoodsOrderDetail

Query

参数名 类型 必需 描述 示例
order_id string 1 10

Header

参数名 类型 必需 描述 示例
Authorization string 1

返回示例

{
    "status": 200,
    "msg": "获取成功",
    "data": {
        "goods_logo": "http://chicken.com/uploads/integral_goods/2020-04-29/5ea925c556b27.jpg",
        "goods_name": "汽车模型",
        "num": 1,
        "username": "nianwang",
        "phone": "18617004851",
        "address": "广东省 深圳市 龙岗区 龙岗街道志联佳大厦222",
        "order_num": "20060410221360173789",
        "pay_method": "积分",
        "create_at": "2020-06-04 10:22"
    }
}

获取积分商城商品详情

GET {{base_url}}/getIntegralGoodsDetail

Query

参数名 类型 必需 描述 示例
goods_id string 1

返回示例

{
    "status": 200,
    "msg": "success",
    "data": {
        "goods_id": 5,
        "goods_name": "汽车模型",
        "goods_logo": "integral_goods/2020-04-29/5ea925d73309d.jpg",
        "integral": 1000,
        "num": 9,
        "status": 1,
        "create_at": "2020-04-29 14:59:35",
        "update_at": 1588143700,
        "is_recommend": 1
    }
}

获取积分明细

GET {{base_url}}/getIntegralRecord

Header

参数名 类型 必需 描述 示例
Authorization string 1

返回示例

{
    "status": 200,
    "msg": "success",
    "data": {
        "current_page": 1,
        "data": [
            {
                "id": 4,
                "type": 1,
                "uid": 14,
                "integral": 1,
                "remark": "签到",
                "addtime": 1591079945
            },
            {
                "id": 5,
                "type": 1,
                "uid": 14,
                "integral": 2,
                "remark": "签到",
                "addtime": 1591179712
            },
            {
                "id": 6,
                "type": 2,
                "uid": 14,
                "integral": -1000,
                "remark": "兑换积分商品",
                "addtime": 1591237334
            },
            {
                "id": 7,
                "type": 1,
                "uid": 14,
                "integral": 3,
                "remark": "签到",
                "addtime": 1591237887
            }
        ],
        "first_page_url": "http://192.168.1.173:83/module/chickenshop/getIntegralRecord?page=1",
        "from": 1,
        "last_page": 1,
        "last_page_url": "http://192.168.1.173:83/module/chickenshop/getIntegralRecord?page=1",
        "next_page_url": null,
        "path": "http://192.168.1.173:83/module/chickenshop/getIntegralRecord",
        "per_page": 15,
        "prev_page_url": null,
        "to": 4,
        "total": 4
    }
}

购物车

获取购物车商品数量

GET {{base_url}}/cart/getCartGoodsNum

Query

参数名 类型 必需 描述 示例
shop_id string 1

Header

参数名 类型 必需 描述 示例
Authorization string 1

Body

参数名 类型 必需 描述 示例
shop_id string 1 1

返回示例

{
    "status": 200,
    "msg": "success",
    "data": {
        "count": "7"
    }
}

获取购物车信息

GET {{base_url}}/cart/getCart

Query

参数名 类型 必需 描述 示例
shop_id string 1

Header

参数名 类型 必需 描述 示例
Authorization string 1

Body

参数名 类型 必需 描述 示例
shop_id string 1 1

返回示例

{
    "status": 200,
    "msg": "success",
    "data": [
        {
            "shop": {
                "shop_id": 1,
                "shop_name": "便利店(爱联店)",
                "shop_logo": "http://chicken.com/uploads/shop_logo/2020-04-15/5e96870366015.png",
                "send_goods_time": 0,
                "distribution_fee": 0
            },
            "carts": [
                {
                    "id": 179,
                    "uid": 14,
                    "shop_id": 1,
                    "goods_id": 4,
                    "goods_name": "百事可乐",
                    "goods_img": "http://chicken.com/uploads/goods/2020-04-17/5e99657739027.png",
                    "goods_num": 2,
                    "goods_price": "3.00",
                    "goods_status": 1,
                    "created_at": "2020-05-29 14:57:48",
                    "updated_at": "2020-05-29 14:58:29",
                    "goods": {
                        "goods_id": 4,
                        "uid": 4,
                        "library_id": 0,
                        "shop_id": 1,
                        "shop_type": 1,
                        "cate_id": "14",
                        "bar_code": "6922858211077",
                        "goods_name": "百事可乐",
                        "goods_logo": "http://chicken.com/uploads/goods/2020-04-17/5e99657739027.png",
                        "goods_tags": null,
                        "price": "3.00",
                        "price_old": "3.00",
                        "packing": "0.00",
                        "num": 100,
                        "monthly_sale": 0,
                        "goods_describe": "",
                        "status": 1,
                        "create_at": "2020-04-17 16:14:47",
                        "update_at": 1587111287
                    }
                },
                {
                    "id": 178,
                    "uid": 14,
                    "shop_id": 1,
                    "goods_id": 2,
                    "goods_name": "奥尔良鸡翅",
                    "goods_img": "http://chicken.com/uploads/goods/2020-04-15/5e96e87b772cc.png",
                    "goods_num": 4,
                    "goods_price": "10.00",
                    "goods_status": 1,
                    "created_at": "2020-05-29 14:52:37",
                    "updated_at": "2020-05-29 14:53:28",
                    "goods": {
                        "goods_id": 2,
                        "uid": 4,
                        "library_id": 0,
                        "shop_id": 1,
                        "shop_type": 2,
                        "cate_id": "1,3",
                        "bar_code": "A000000002",
                        "goods_name": "奥尔良鸡翅",
                        "goods_logo": "http://chicken.com/uploads/goods/2020-04-15/5e96e87b772cc.png",
                        "goods_tags": null,
                        "price": "10.00",
                        "price_old": "10.00",
                        "packing": "0.00",
                        "num": 100,
                        "monthly_sale": 0,
                        "goods_describe": "",
                        "status": 1,
                        "create_at": "2020-04-15 00:00:00",
                        "update_at": 1586948219
                    }
                },
                {
                    "id": 177,
                    "uid": 14,
                    "shop_id": 1,
                    "goods_id": 1,
                    "goods_name": "香辣鸡翅",
                    "goods_img": "http://chicken.com/uploads/goods/2020-04-15/5e96e85c35f1c.jpg",
                    "goods_num": 1,
                    "goods_price": "10.00",
                    "goods_status": 1,
                    "created_at": "2020-05-29 14:52:34",
                    "updated_at": "2020-05-29 14:52:34",
                    "goods": {
                        "goods_id": 1,
                        "uid": 4,
                        "library_id": 0,
                        "shop_id": 1,
                        "shop_type": 2,
                        "cate_id": "1,3",
                        "bar_code": "A000000001",
                        "goods_name": "香辣鸡翅",
                        "goods_logo": "http://chicken.com/uploads/goods/2020-04-15/5e96e85c35f1c.jpg",
                        "goods_tags": null,
                        "price": "10.00",
                        "price_old": "10.00",
                        "packing": "0.00",
                        "num": 100,
                        "monthly_sale": 0,
                        "goods_describe": "",
                        "status": 1,
                        "create_at": "2020-04-15 00:00:00",
                        "update_at": 1586948188
                    }
                }
            ]
        },
        {
            "shop": {
                "shop_id": 2,
                "shop_name": "便利店(布吉店)",
                "shop_logo": "http://chicken.com/uploads/shop_logo/2020-04-15/5e96a157593d6.png",
                "send_goods_time": 0,
                "distribution_fee": 0
            },
            "carts": [
                {
                    "id": 176,
                    "uid": 14,
                    "shop_id": 2,
                    "goods_id": 3,
                    "goods_name": "百事可乐",
                    "goods_img": "http://chicken.com/uploads/goods/2020-04-17/5e99603f3361e.png",
                    "goods_num": 2,
                    "goods_price": "4.00",
                    "goods_status": 1,
                    "created_at": "2020-05-29 14:45:13",
                    "updated_at": "2020-05-29 14:57:35",
                    "goods": {
                        "goods_id": 3,
                        "uid": 5,
                        "library_id": 0,
                        "shop_id": 2,
                        "shop_type": 1,
                        "cate_id": "11",
                        "bar_code": "6922858211077",
                        "goods_name": "百事可乐",
                        "goods_logo": "http://chicken.com/uploads/goods/2020-04-17/5e99603f3361e.png",
                        "goods_tags": null,
                        "price": "4.00",
                        "price_old": "6.00",
                        "packing": "0.00",
                        "num": 100,
                        "monthly_sale": 0,
                        "goods_describe": "",
                        "status": 1,
                        "create_at": "2020-04-17 00:00:00",
                        "update_at": 1587109951
                    }
                }
            ]
        }
    ]
}

添加/减少购物车

POST {{base_url}}/cart/editCart

Header

参数名 类型 必需 描述 示例
Authorization string 1

Body

参数名 类型 必需 描述 示例
goods_id string 1 5
type string 1 1

返回示例

{
    "status": 200,
    "msg": "success",
    "data": null
}

清空购物车

POST {{base_url}}/cart/emptyShopCart

Header

参数名 类型 必需 描述 示例
Authorization string 1

Body

参数名 类型 必需 描述 示例
shop_id string 1 1

返回示例

{
    "status": 200,
    "msg": "success",
    "data": null
}

删除购物车

POST {{base_url}}/cart/deleteCart

Header

参数名 类型 必需 描述 示例
Authorization string 1

Body

参数名 类型 必需 描述 示例
cart_ids[0] string 1 1
cart_ids[1] string 1

返回示例

{
    "status": 200,
    "msg": "success",
    "data": null
}

计算店铺购物车价格

POST {{base_url}}/cart/getShopCart

Header

参数名 类型 必需 描述 示例
Authorization string 1 bearer {{token}}

Body

参数名 类型 必需 描述 示例
shop_id string 1 5

返回示例

{
    "status": 200,
    "msg": "success",
    "data": {
        "goods_count": 7,
        "carts": [
            {
                "id": 177,
                "uid": 14,
                "shop_id": 1,
                "goods_id": 1,
                "goods_name": "香辣鸡翅",
                "goods_img": "http://chicken.com/uploads/goods/2020-04-15/5e96e85c35f1c.jpg",
                "goods_num": 1,
                "goods_price": "10.00",
                "goods_status": 1,
                "created_at": "2020-05-29 14:52:34",
                "updated_at": "2020-05-29 14:52:34"
            },
            {
                "id": 178,
                "uid": 14,
                "shop_id": 1,
                "goods_id": 2,
                "goods_name": "奥尔良鸡翅",
                "goods_img": "http://chicken.com/uploads/goods/2020-04-15/5e96e87b772cc.png",
                "goods_num": 4,
                "goods_price": "10.00",
                "goods_status": 1,
                "created_at": "2020-05-29 14:52:37",
                "updated_at": "2020-05-29 14:53:28"
            },
            {
                "id": 179,
                "uid": 14,
                "shop_id": 1,
                "goods_id": 4,
                "goods_name": "百事可乐",
                "goods_img": "http://chicken.com/uploads/goods/2020-04-17/5e99657739027.png",
                "goods_num": 2,
                "goods_price": "3.00",
                "goods_status": 1,
                "created_at": "2020-05-29 14:57:48",
                "updated_at": "2020-05-29 14:58:29"
            }
        ],
        "original_goods_money": "56.00",
        "goods_money": "46.00",
        "full_reduction": {
            "full_id": 4,
            "shop_id": 1,
            "shop_type": 1,
            "use_money": 20,
            "reduce_money": 10,
            "status": 1,
            "create_at": "2020-04-17 17:39:23",
            "update_at": 1587352468
        },
        "next_full_reduction": {
            "full_id": 6,
            "shop_id": 1,
            "shop_type": 1,
            "use_money": 60,
            "reduce_money": 15,
            "status": 1,
            "create_at": "2020-06-01 13:45:22",
            "update_at": 1587116402
        }
    }
}

返回参数

参数名 类型 描述
data.goods_count number 商品总计数量
data.carts array 购物车商品信息
data.original_goods_money string 商品总价
data.goods_money string 商品现价
data.full_reduction object 当前符合满减
data.next_full_reduction object 下一满减
data.full_reduction.use_money number 满多少金额
data.full_reduction.reduce_money number 减免金额
## 其他

刷新Token

GET {{base_url}}/refreshToken

Header

参数名 类型 必需 描述 示例
Authorization string 1 bearer {{token}}

返回示例

{
    "status": 200,
    "msg": "success",
    "data": {
        "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjIxLCJpc3MiOiJodHRwOi8vMTkyLjE2OC4xLjE3Mzo4My9tb2R1bGUvY2hpY2tlbnNob3AvcmVmcmVzaFRva2VuIiwiaWF0IjoxNTkxMzI0NjU1LCJleHAiOjE1OTY1Mjg1OTcsIm5iZiI6MTU5MTM0NDU5NywianRpIjoieVZzRWF4dFYwSnVOYll5OCJ9.5RTkn4tqKAvM2VpEraHdfBlXILa8t6fXb_86mpsbO_I"
    }
}

用户端首页

GET {{base_url}}/index

Query

参数名 类型 必需 描述 示例
req_type string 1 app
longitude string 1 114.041523
latitude string 1 22.613933

返回示例

{
    "status": 200,
    "msg": "获取成功",
    "data": {
        "banner": [
            {
                "images": "http://192.168.1.173:83/uploads/banner/2020-05-06/5eb2281763c16.png",
                "url": "#"
            },
            {
                "images": "http://192.168.1.173:83/uploads/banner/2020-05-06/5eb228309df31.png",
                "url": "#"
            },
            {
                "images": "http://192.168.1.173:83/uploads/banner/2020-05-06/5eb2283d28eeb.png",
                "url": "#"
            }
        ],
        "convenience_store": [
            {
                "shop_id": 4,
                "shop_type": 1,
                "shop_name": "炸鸡店(深圳北站店)",
                "shop_logo": "http://192.168.1.173:83/uploads/shop_logo/2020-05-06/5eb22d41a9949.png",
                "distance": "307m",
                "shop_type_name": "便利店"
            },
            {
                "shop_id": 5,
                "shop_type": 1,
                "shop_name": "便利店(深圳北站店)",
                "shop_logo": "http://192.168.1.173:83/uploads/shop_logo/2020-05-06/5eb22df5986fc.png",
                "distance": "628m",
                "shop_type_name": "便利店"
            },
            {
                "shop_id": 2,
                "shop_type": 1,
                "shop_name": "便利店(布吉店)",
                "shop_logo": "http://192.168.1.173:83/uploads/shop_logo/2020-04-15/5e96a157593d6.png",
                "distance": "9.2km",
                "shop_type_name": "便利店"
            },
            {
                "shop_id": 3,
                "shop_type": 1,
                "shop_name": "炸鸡店(布吉店)",
                "shop_logo": "http://192.168.1.173:83/uploads/shop_logo/2020-05-06/5eb22cbd93ba7.png",
                "distance": "9.2km",
                "shop_type_name": "便利店"
            },
            {
                "shop_id": 1,
                "shop_type": 1,
                "shop_name": "便利店(爱联店)",
                "shop_logo": "http://192.168.1.173:83/uploads/shop_logo/2020-04-15/5e96870366015.png",
                "distance": "23.4km",
                "shop_type_name": "便利店"
            }
        ],
        "fried_chicken_shop": [],
        "enclosure_shop": [
            {
                "shop_id": 4,
                "shop_type": 1,
                "shop_name": "炸鸡店(深圳北站店)",
                "shop_logo": "http://192.168.1.173:83/uploads/shop_logo/2020-05-06/5eb22d41a9949.png",
                "star": "5.0",
                "monthly_sale": 0,
                "exceed_money_send_goods": 0,
                "distribution_fee": 0,
                "distribution_fee_old": 0,
                "send_goods_time": 0,
                "distance": "307m",
                "shop_type_name": "便利店"
            },
            {
                "shop_id": 5,
                "shop_type": 1,
                "shop_name": "便利店(深圳北站店)",
                "shop_logo": "http://192.168.1.173:83/uploads/shop_logo/2020-05-06/5eb22df5986fc.png",
                "star": "5.0",
                "monthly_sale": 0,
                "exceed_money_send_goods": 0,
                "distribution_fee": 0,
                "distribution_fee_old": 0,
                "send_goods_time": 0,
                "distance": "628m",
                "shop_type_name": "便利店"
            },
            {
                "shop_id": 2,
                "shop_type": 1,
                "shop_name": "便利店(布吉店)",
                "shop_logo": "http://192.168.1.173:83/uploads/shop_logo/2020-04-15/5e96a157593d6.png",
                "star": "5.0",
                "monthly_sale": 0,
                "exceed_money_send_goods": 0,
                "distribution_fee": 0,
                "distribution_fee_old": 0,
                "send_goods_time": 0,
                "distance": "9.2km",
                "shop_type_name": "便利店"
            },
            {
                "shop_id": 3,
                "shop_type": 1,
                "shop_name": "炸鸡店(布吉店)",
                "shop_logo": "http://192.168.1.173:83/uploads/shop_logo/2020-05-06/5eb22cbd93ba7.png",
                "star": "5.0",
                "monthly_sale": 0,
                "exceed_money_send_goods": 0,
                "distribution_fee": 0,
                "distribution_fee_old": 0,
                "send_goods_time": 0,
                "distance": "9.2km",
                "shop_type_name": "便利店"
            },
            {
                "shop_id": 1,
                "shop_type": 1,
                "shop_name": "便利店(爱联店)",
                "shop_logo": "http://192.168.1.173:83/uploads/shop_logo/2020-04-15/5e96870366015.png",
                "star": "4.9",
                "monthly_sale": 0,
                "exceed_money_send_goods": 0,
                "distribution_fee": 2,
                "distribution_fee_old": 0,
                "send_goods_time": 0,
                "distance": "23.4km",
                "shop_type_name": "便利店"
            },
            {
                "shop_id": 7,
                "shop_type": 2,
                "shop_name": "首尔炸鸡",
                "shop_logo": "http://192.168.1.173:83/uploads/shop_logo/2020-05-06/5eb22df5986fc.png",
                "star": "5.0",
                "monthly_sale": 0,
                "exceed_money_send_goods": 0,
                "distribution_fee": 0,
                "distribution_fee_old": 0,
                "send_goods_time": 0,
                "distance": "36.6km",
                "shop_type_name": "美食店"
            },
            {
                "shop_id": 8,
                "shop_type": 1,
                "shop_name": "记得便利店",
                "shop_logo": "http://192.168.1.173:83/uploads/shop_logo/2020-05-06/5eb22df5986fc.png",
                "star": "5.0",
                "monthly_sale": 0,
                "exceed_money_send_goods": 0,
                "distribution_fee": 0,
                "distribution_fee_old": 0,
                "send_goods_time": 0,
                "distance": "36.6km",
                "shop_type_name": "便利店"
            },
            {
                "shop_id": 6,
                "shop_type": 1,
                "shop_name": "好吃不胖炸鸡店",
                "shop_logo": "http://192.168.1.173:83/uploads/shop_logo/2020-05-28/5ecf74a943f77.jpg",
                "star": "5.0",
                "monthly_sale": 0,
                "exceed_money_send_goods": 0,
                "distribution_fee": 0,
                "distribution_fee_old": 0,
                "send_goods_time": 0,
                "distance": "1942.6km",
                "shop_type_name": "便利店"
            }
        ]
    }
}

附近店铺

GET {{base_url}}/getNearbyShops

Query

参数名 类型 必需 描述 示例
longitude string 1 114.041523
latitude string 1 22.613933
orderBy string 1 star-desc
shop_type string 1 1
keyword string 1 便利店
page string 1 1
pagesize string 1 1

返回示例

{
    "status": 200,
    "msg": "获取成功",
    "data": [
        {
            "shop_id": 2,
            "shop_type": 1,
            "shop_name": "便利店(布吉店)",
            "shop_logo": "http://chicken.com/uploads/shop_logo/2020-04-15/5e96a157593d6.png",
            "star": "5.0",
            "monthly_sale": 0,
            "exceed_money_send_goods": 0,
            "distribution_fee": 0,
            "distribution_fee_old": 0,
            "send_goods_time": 0,
            "distance": "9.2km""distance_far": "1"//0=近距离1=远距离
        }
    ]
}

首页便利店

GET {{base_url}}/getNearbyShops

Query

参数名 类型 必需 描述 示例
longitude string 1 114.041523
latitude string 1 22.613933
orderBy string 1 star-desc
shop_type string 1 1
keyword string 1 便利店
page string 1 1
pagesize string 1 1

首页炸鸡店

GET {{base_url}}/getNearbyShops

Query

参数名 类型 必需 描述 示例
longitude string 1 114.041523
latitude string 1 22.613933
orderBy string 1 star-desc
shop_type string 1 2
keyword string 1
page string 1 1
pagesize string 1 1
文档更新时间: 2020-09-24 14:50   作者:nianwang