##查看所有訂單
~~~[api]
post:/192.168.8.60:8011/index.php/index/order/orderList
*string:token_session=默認值#訪問接口必須傳的session
name#說明文字
<<<
success
{
"code": 200,
"msg": "success",
"data": [
{
"id": 1,
"order_no": "20180109001",
"car_no": "1",
"user_name": "楊天寶",
"tel": "18724775626",
"course": 10,
"time_length": 127,
"status": 1,
"start_date": "2019-01-09 16:23:23",
"end_date": "2019-01-09 16:33:23",
"total_info": "10.00元",
"total_pay_info": "10.00元"
},
{
"id": 2,
"order_no": "20180109002",
"car_no": "1",
"user_name": "楊天寶",
"tel": "18724775626",
"course": 10,
"time_length": 127,
"status": 1,
"start_date": "2019-01-08 16:23:23",
"end_date": "2019-01-08 16:33:23",
"total_info": "10.00元",
"total_pay_info": "10.00元"
}
]
}
<<<
error
{
"code": 10001,
"msg": "應用尚未登陸",
"data": ""
}
~~~
| 字段名 |描述 |
| --- | --- |
| order_no | 訂單編號 |
| car_no| 車輛編號|
| user_name| 用戶名|
| tel| 手機號|
| course| 里程|
| time_length| 行程時常|
| status_info| 狀態|
| start_date| 開始時間|
| end_date| 結束時間|
| total_info| 訂單金額|
| total_pay_info| 實付金額|
## 查看某條訂單詳情
~~~[api]
get:/192.168.8.60:8011/index.php/index/order/getOrderInfo
*string:token_session=默認值#訪問 接口必帶的token
*int:id#訂單id值
<<<
success
{
"code": 200,
"msg": "success",
"data": {
"id": 1,
"order_no": "20180109001",
"car_no": "1",
"user_name": "楊天寶",
"tel": "18724775626",
"course": 10,
"time_length": 127,
"status": 1,
"start_time": 1547022203,
"end_time": 1547022803,
"total": 1000,
"total_pay": 1000,
"start_date": "2019-01-09 16:23:23",
"end_date": "2019-01-09 16:33:23",
"total_info": "10.00元",
"total_pay_info": "10.00元",
"status_info": "正常"
}
}
<<<
error
{
"code": 20001,
"msg": "參數錯誤",
"data": ""
}
~~~
## 新增訂單
~~~[api]
post:/192.168.8.60:8011/index.php/index/order/addorder
*string:token_session=默認值#訪問接口必帶的session
*user_name#用戶名
*car_no#車輛編號
*tel#聯系電話
*course#里程
*start_time#開始時間
*end_time#結束時間
*total#訂單金額
*total_pay#實付金額
<<<
success
{
"code": 200,
"msg": "success",
"data": "新增成功"
}
<<<
error
{
"code": 200,
"msg": "ERROR",
"data": "請填寫員工名"
}
~~~
## 編輯訂單
~~~[api]
post:/192.168.8.60:8011/index.php/index/order/editorder
*string:token_session=默認值#訪問接口必帶的session
*user_name#用戶名
*car_no#車輛編號
*tel#聯系電話
*course#里程
*start_time#開始時間
*end_time#結束時間
*total#訂單金額
*total_pay#實付金額
<<<
success
{
"code": 200,
"msg": "success",
"data": "編輯成功"
}
<<<
error
{
"code": 10001,
"msg": "應用尚未登陸",
"data": ""
}
~~~