外卖前端接口文档

编程入门 行业动态 更新时间:2024-10-11 05:21:07

<a href=https://www.elefans.com/category/jswz/34/1768217.html style=外卖前端接口文档"/>

外卖前端接口文档

API

###商品列表

GET /sell/buyer/product/list

参数

返回

{"code": 0,"msg": "成功","data": [{"name": "热榜","type": 1,"foods": [{"id": "123456","name": "皮蛋粥","price": 1.2,"description": "好吃的皮蛋粥","icon": "",}]},{"name": "好吃的","type": 2,"foods": [{"id": "123457","name": "慕斯蛋糕","price": 10.9,"description": "美味爽口","icon": "",}]}]
}

###创建订单

POST /sell/buyer/order/create

参数

name: "张三"
phone: "18868822111"
address: "neusoft总部"
openid: "ew3euwhd7sjw9diwkq" //用户的微信openid
items: [{productId: "1423113435324",productQuantity: 2 //购买数量
}]

返回

{"code": 0,"msg": "成功","data": {"orderId": "147283992738221" }
}

###订单列表

GET /sell/buyer/order/list

参数

openid: 18eu2jwk2kse3r42e2e
page: 0 //从第0页开始
size: 10

返回

{"code": 0,"msg": "成功","data": [{"orderId": "161873371171128075","buyerName": "张三","buyerPhone": "18868877111","buyerAddress": "neusoft总部","buyerOpenid": "18eu2jwk2kse3r42e2e","orderAmount": 0,"orderStatus": 0,"payStatus": 0,"createTime": 1490171219,"updateTime": 1490171219,"orderDetailList": null},{"orderId": "161873371171128076","buyerName": "张三","buyerPhone": "18868877111","buyerAddress": "neusoft总部","buyerOpenid": "18eu2jwk2kse3r42e2e","orderAmount": 0,"orderStatus": 0,"payStatus": 0,"createTime": 1490171219,"updateTime": 1490171219,"orderDetailList": null}]
}

###查询订单详情

GET /sell/buyer/order/detail

参数

openid: 18eu2jwk2kse3r42e2e
orderId: 161899085773669363

返回

{"code": 0,"msg": "成功","data": {"orderId": "161899085773669363","buyerName": "李四","buyerPhone": "18868877111","buyerAddress": "neusoft总部","buyerOpenid": "18eu2jwk2kse3r42e2e","orderAmount": 18,"orderStatus": 0,"payStatus": 0,"createTime": 1490177352,"updateTime": 1490177352,"orderDetailList": [{"detailId": "161899085974995851","orderId": "161899085773669363","productId": "157875196362360019","productName": "招牌奶茶","productPrice": 9,"productQuantity": 2,"productIcon": "","productImage": ""}]}
}

###取消订单

POST /sell/buyer/order/cancel

参数

openid: 18eu2jwk2kse3r42e2e
orderId: 161899085773669363

返回

{"code": 0,"msg": "成功","data": null
}

###获取openid

重定向到 /sell/wechat/authorize

参数

returnUrl:   //【必填】

返回

=oZxSYw5ldcxv6H0EU67GgSXOUrVg

###支付订单

重定向 /sell/pay/create

参数

orderId: 161899085773669363
returnUrl: 

返回


更多推荐

外卖前端接口文档

本文发布于:2024-03-08 20:05:20,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1722151.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:外卖   接口   文档

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!