店铺接口

GET /index.php?action=shop/list
获取店铺列表

请求参数

参数名 类型 必填 说明
status integer 店铺状态(1:正常)
GET /index.php?action=shop/detail
获取店铺详情

请求参数

参数名 类型 必填 说明
shop_id integer 店铺ID
include_merchant boolean 是否包含商家信息
GET /index.php?action=shop/products
获取店铺商品列表

请求参数

参数名 类型 必填 说明
shop_id integer 店铺ID
status integer 商品状态(1:正常)

商品接口

GET /index.php?action=product/detail
获取商品详情

请求参数

参数名 类型 必填 说明
product_id integer 商品ID

用户接口

GET /index.php?action=user/info
获取用户信息

请求头

参数名 必填 说明
Token 用户登录token
POST /index.php?action=user/login
用户登录

请求参数

参数名 类型 必填 说明
phone string 手机号
code string 验证码
POST /index.php?action=user/sendSmsCode
发送短信验证码

请求参数

参数名 类型 必填 说明
phone string 手机号

订单接口

POST /index.php?action=order/create
创建订单

请求头

参数名 必填 说明
Token 用户登录token

请求参数

参数名 类型 必填 说明
shop_id integer 店铺ID
address_id integer 收货地址ID
products array 商品列表
total_amount decimal 订单总金额
remark string 订单备注
POST /index.php?action=order/print
订单自动打印

请求头

参数名 必填 说明
Token 用户登录token

请求参数

参数名 类型 必填 说明
order_id integer 订单ID
printer_id integer 打印机ID
print_type integer 打印类型(1:小票打印,2:面单打印,默认1)
copies integer 打印份数(默认1份)

响应示例

{
    "code": 0,
    "message": "success",
    "data": {
        "print_id": 123,
        "order_id": 456,
        "status": 1,
        "print_time": "2023-06-01 12:30:45"
    }
}