From 27e36b36369b5f8b03395a56b226a0fc44f7f610 Mon Sep 17 00:00:00 2001 From: cyc Date: Thu, 23 Aug 2018 11:30:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E9=80=94=E7=89=9B=E4=B8=8D?= =?UTF-8?q?=E6=8F=90=E4=BE=9B=E6=95=B0=E6=8D=AE=E7=9A=84=E5=BA=A7=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/third_party/tuniu/controllers/tuniu_train.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/application/third_party/tuniu/controllers/tuniu_train.php b/application/third_party/tuniu/controllers/tuniu_train.php index 08bcb176..e33cc7f1 100644 --- a/application/third_party/tuniu/controllers/tuniu_train.php +++ b/application/third_party/tuniu/controllers/tuniu_train.php @@ -53,7 +53,8 @@ class Tuniu_train extends CI_Controller{ if(empty(json_decode($back_data)->data)){ log_message('error','tuniu:'.json_encode($post_data)); } - //print_r(json_decode($back_data)->data); + //print_r(json_decode($back_data)); + $return_data = new stdClass(); $return_data->returnCode = json_decode($back_data)->returnCode; //echo $return_data->returnCode; @@ -133,7 +134,7 @@ class Tuniu_train extends CI_Controller{ } $pricestr = $seat_type.'"train_no":'.'"'.$value->trainNo.'"'; //余票字符串 - $return_data->data->result[$i] = '|预定|'.$value->trainNo.'|'.$value->trainCode.'|'.$value->fromStationName.'|'.$value->toStationName.'|'.$value->fromStationCode.'|'.$value->toStationCode.'|'.$value->startTime.'|'.$value->arriveTime.'|'.$value->runTime.'|'.$value->canBuyNow.'||'.date('Ymd',strtotime($value->trainStartDate)).'||||||||'.ticket_exchange($value->gjrwNum).'|'.ticket_exchange($value->qtxbNum).'|'.ticket_exchange($value->rwNum).'|'.ticket_exchange($value->rzNum).'|'.ticket_exchange($value->tdzNum).'|'.ticket_exchange($value->wzNum).'||'.ticket_exchange($value->ywNum).'|'.ticket_exchange($value->yzNum).'|'.ticket_exchange($value->edzNum).'|'.ticket_exchange($value->ydzNum).'|'.ticket_exchange($value->swzNum).'|'.ticket_exchange($value->dwNum).'||'; + $return_data->data->result[$i] = '|预定|'.$value->trainNo.'|'.$value->trainCode.'|'.$value->fromStationName.'|'.$value->toStationName.'|'.$value->fromStationCode.'|'.$value->toStationCode.'|'.$value->startTime.'|'.$value->arriveTime.'|'.$value->runTime.'|'.$value->canBuyNow.'||'.date('Ymd',strtotime($value->trainStartDate)).'||||||||'.ticket_exchange($value->gjrwNum).'||'.ticket_exchange($value->rwNum).'|'.ticket_exchange($value->rzNum).'|'.ticket_exchange($value->tdzNum).'|'.ticket_exchange($value->wzNum).'||'.ticket_exchange($value->ywNum).'|'.ticket_exchange($value->yzNum).'|'.ticket_exchange($value->edzNum).'|'.ticket_exchange($value->ydzNum).'|'.ticket_exchange($value->swzNum).'|'.ticket_exchange($value->dwNum).'||'; $data = '{"validateMessagesShowId":"_validatorMessage","status":true,"httpstatus":200,"data":{'.$pricestr.'},"messages":[],"validateMessages":{}}'; $return_data->data->price[$i] = $data; $this->tuniuprice_model->addOrUpdate($value->trainNo,$value->trainCode,$value->fromStationCode,$value->toStationCode,json_encode($data));