```javascript
WXAPI.orderDetail(token, id, hxNumber, peisongOrderId)
```
+ token 用户登陆凭证
+ id 订单ID
+ hxNumber 核销码
+ peisongOrderId 配送订单的订单ID
`id、hxNumber、peisongOrderId`这3个参数,根据你的方便,任意传一个即可
```json
{
"code": 0,
"data": {
"orderLogisticsShipperLogs": [],
"orderInfo": {
"amount": 189,
"amountCard": 0,
"amountCoupons": 0,
"amountLogistics": 0,
"amountReal": 189,
"amountRefundTotal": 0,
"amountTax": 0,
"amountTaxGst": 0,
"amountTaxService": 0,
"autoDeliverStatus": 0,
"dateAdd": "2021-12-10 14:09:50",
"dateClose": "2021-12-10 14:20:50",
"dateUpdate": "2021-12-10 14:21:10",
"differHours": 102,
"goodsNumber": 1,
"hasRefund": false,
"id": 1238758,
"ip": "1.2.3.4",
"isCanHx": false,
"isDelUser": false,
"isEnd": false,
"isHasBenefit": false,
"isNeedLogistics": true,
"isPay": false,
"isScoreOrder": true,
"isSuccessPingtuan": false,
"jd8Status": 0,
"orderNumber": "21121014099510005",
"orderType": 0,
"periodAutoPay": false,
"pid": 0,
"qudanhao": "0005",
"refundStatus": 0,
"remark": "",
"score": 1,
"scoreDeduction": 0,
"shopId": 0,
"status": -1,
"statusStr": "订单关闭",
"trips": 0,
"type": 0,
"uid": 1351478,
"userId": 951
},
"goods": [
{
"afterSale": "0,1,2",
"amount": 189,
"amountCoupon": 0,
"amountSingle": 189,
"amountSingleBase": 189,
"barCode": "a0000000001",
"buyRewardEnd": false,
"categoryId": 1872,
"cyTableStatus": 0,
"dateAdd": "2021-12-10 14:09:50",
"fxType": 2,
"goodsId": 4232,
"goodsName": "兔毛马甲",
"goodsSubName": "bieming",
"id": 1956214,
"isProcessHis": true,
"isScoreOrder": true,
"number": 1,
"numberNoFahuo": 1,
"orderId": 1238758,
"pic": "https://cdn.it120.cc/apifactory/2019/06/25/76d3c433-96ea-4f41-b149-31ea0983cd8f.jpg",
"propertyChildIds": "",
"purchase": false,
"refundStatus": 0,
"saleDateEnd": "2021-12-21 09:58:28",
"score": 1,
"shopId": 0,
"status": -1,
"type": 0,
"uid": 1351478,
"unit": "份",
"userId": 951
}
],
"logistics": {
"address": "收货地址详细地址",
"areaStr": "西湖区",
"cityId": "330100000000",
"cityStr": "杭州市",
"code": "undefined",
"dateUpdate": "2021-12-10 14:09:50",
"districtId": "330106000000",
"id": 1238758,
"linkMan": "章三",
"mobile": "13500000000",
"provinceId": "330000000000",
"provinceStr": "浙江省",
"status": -1,
"streetId": "330106109000",
"type": 0,
"userId": 951
},
"extJson": {},
"orderLogisticsShippers": [],
"user": {
"nick": "gooking(api工厂创始人)",
"avatarUrl": "https://dcdn.it120.cc/cuser/951/2021/07/15/309311d6-52a3-46a4-931c-6458aff42f58.jpg"
},
"logs": [
{
"dateAdd": "2021-12-10 14:09:50",
"id": 4228786,
"orderId": 1238758,
"type": 0,
"typeStr": "下单",
"uid": 1351478,
"userId": 951
},
{
"dateAdd": "2021-12-10 14:21:10",
"id": 4228900,
"orderId": 1238758,
"type": -1,
"typeStr": "关闭订单",
"uid": 1351478,
"userId": 951
}
]
},
"msg": "success"
}
```
# orderInfo 订单基本信息
+ id 订单ID
+ orderNumber 订单号
+ amount 货款
+ amountReal 实际需要支付金额
+ amountCoupons 优惠券抵扣金额
+ amountCard 会员卡抵扣金额
+ amountLogistics 运费
+ deductionMoney 优惠金额
+ couponUserList 本次下单可以选择使用的优惠券数组
+ amountTotle 订单总金额
+ goodsNumber 商品数量
+ score 需要扣除多少积分
+ amountRefundTotal 退款总金额
+ amountTax 税费
+ amountTaxGst GST消费税
+ amountTaxService 服务费
+ dateAdd 下单时间
+ dateClose 预计取消订单时间(可以提醒用户在这个时间之前完成支付)
+ differHours 下单离现在相差多少个小时
+ qudanhao 订单号后4位的取单号
+ goodsNumber 商品数量
+ hasRefund 该订单是否有退款
+ ip 下单IP地址
+ isCanHx 当前订单是否支持核销
+ isEnd 订单是否完结(完结以后不允许申请售后,该状态建议隐藏退货按钮)
+ isNeedLogistics 是否需要快递
+ isPay 当前订单是否已支付
+ isScoreOrder 是否为积分订单(使用了积分进行支付的订单)
+ remark 用户下单备注
+ score 本次订单需要扣除多少积分
+ scoreDeduction 本次订单使用了多少积分进行抵扣
+ shopId 订单的所属门店ID
+ status 订单状态 -1 关闭订单 0 待支付 1 已支付待发货 2 已发货待确认 3 确认收货待评价 4 已评价
+ trips 小费金额
+ type 0 普通订单 1 周期订单 2 扫码点餐订单 3 京东vop订单 4 从区管进货
+ peisongType 配送类型
- 3 代表闪送,`orderNumberOuter`为闪送侧订单号,`peisongStatus`为配送状态如下:
* 20 派单中(转单改派中)
* 30 待取货(已就位)
* 40 闪送中(申请取消中、物品送回中、取消单客服介入中)
* 50 已完成(已退款)
* 60 已取消
- 2 美团
- 1 达达
- 0 商家自己配送
+ peisongName 配送员姓名
+ peisongMobile 配送员联系电话
# goods 购买的商品信息
+ goodsName 商品名称
+ goodsSubName 商品名称副标题
+ pic 商品图片
+ amountSingle 商品单价
+ number 商品数量
+ amount 商品总价
# logistics 收货地址
+
# user 下单用户信息
+ nick 昵称
+ avatarUrl 头像
# logs 订单操作日志
+ type 事件类型(-1 关闭订单 0 下单 1 支付 2 发货 3 确认收货 4 评价 5 卖家修改价格 6 商家设置交易完成 7退款 8 创建子订单 100 增加商品 11 代支付)
+ typeStr 事件类型的中文描述
+ dateAdd 操作时间
# extJson 订单扩展属性
# peisongOrderInfo 配送订单信息
+ orderNumber 配送订单号