🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
[TOC] ## (一)返回来的数据是数组格式 ``` [data] => {"from_station_name":"上海西","from_station_code":"SXH","to_station_name":"上海","to_station_code":"SHH","train_date":"2018-02-26","orderid":"JH151797296642024","user_orderid":"T201802071109223619451","orderamount":"8.50","ordernumber":"EG64482212","checi":"G7033","msg":"处理或操作成功;待支付","status":"2","passengers":[{"passengerid":"104","passengersename":"郭锐","piaotype":1,"piaotypename":"成人票","passporttypeseid":"1","passporttypeseidname":"二代身份证","passportseno":"140103198205284214","price":"8.5","zwcode":"O","zwname":"二等座","ticket_no":"EG64482212101009A","cxin":"01车厢,09A座","reason":0}],"refund_money":null,"sign":"9a349b02d40f184f63089cc43ac06024"} ``` ## (二)整理数据 ``` [data] => {"from_station_name":"上海西", "from_station_code":"SXH", "to_station_name":"上海", "to_station_code":"SHH", "train_date":"2018-02-26", "orderid":"JH151797296642024", "user_orderid":"T201802071109223619451", "orderamount":"8.50", "ordernumber":"EG64482212", "checi":"G7033", "msg":"处理或操作成功;待支付", "status":"2", "passengers":[{"passengerid":"104","passengersename":"郭锐","piaotype":1,"piaotypename":"成人票","passporttypeseid":"1","passporttypeseidname":"二代身份证","passportseno":"140103198205284214","price":"8.5","zwcode":"O","zwname":"二等座","ticket_no":"EG64482212101009A","cxin":"01车厢,09A座","reason":0}], "refund_money":null, "sign":"9a349b02d40f184f63089cc43ac06024"} ``` ## (三)这是写入服务器的json格式 >{"data":"{\"from_station_name\":\"\u4e0a\u6d77\u897f\",\"from_station_code\":\"SXH\",\"to_station_name\":\"\u4e0a\u6d77\",\"to_station_code\":\"SHH\",\"train_date\":\"2018-02-26\",\"orderid\":\"JH151797296642024\",\"user_orderid\":\"T201802071109223619451\",\"orderamount\":\"8.50\",\"ordernumber\":\"EG64482212\",\"checi\":\"G7033\",\"msg\":\"\u5904\u7406\u6216\u64cd\u4f5c\u6210\u529f;\u5f85\u652f\u4ed8\",\"status\":\"2\",\"passengers\":[{\"passengerid\":\"104\",\"passengersename\":\"\u90ed\u9510\",\"piaotype\":1,\"piaotypename\":\"\u6210\u4eba\u7968\",\"passporttypeseid\":\"1\",\"passporttypeseidname\":\"\u4e8c\u4ee3\u8eab\u4efd\u8bc1\",\"passportseno\":\"140103198205284214\",\"price\":\"8.5\",\"zwcode\":\"O\",\"zwname\":\"\u4e8c\u7b49\u5ea7\",\"ticket_no\":\"EG64482212101009A\",\"cxin\":\"01\u8f66\u53a2,09A\u5ea7\",\"reason\":0}],\"refund_money\":null,\"sign\":\"9a349b02d40f184f63089cc43ac06024\"}"} ## (四)整理后数组 ``` Array ( [from_station_name] => 北京南 //开始站 [from_station_code] => VNP //开始站简码 [to_station_name] => 上海虹桥 //到达站 [to_station_code] => AOH //到达站简码 [train_date] => 2017-12-09 //出发日期 [orderid] => JH151235759891342 //聚合订单号 [user_orderid] => 201712041119587544404 //您自定义的订单号 [orderamount] => 553.00 //订单金额 [ordernumber] => E975499210 //12306的订单号 [checi] => G101 //车次 [msg] => //订单描述信息 [status] => 2 //订单可能状态 [passengers] => Array //乘客信息 ( [0] => Array ( [passengerid] => 68 [passengersename] => 杨红伟 [piaotype] => 1 [piaotypename] => 成人票 [passporttypeseid] => 1 [passporttypeseidname] => 二代身份证 [passportseno] => 142201198311174558 [price] => 553.0 [zwcode] => O [zwname] => 二等座 [ticket_no] => E975499210110006A [cxin] => 10车厢,06A座 [reason] => 0 ) ) [refund_money] => //退票金额 [sign] => bc0ad41a4a1296dd401b4f528648aaa0 ) ```