From 7f88fd79f833f1c59952ce8391552d421141647c Mon Sep 17 00:00:00 2001 From: cyc Date: Thu, 1 Nov 2018 15:34:50 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E5=B0=86=E5=88=86=E4=BA=AB=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E6=94=B9=E4=B8=BA=E6=A0=87=E7=AD=BE=E5=BD=A2=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../third_party/htmlcompressor/views/amp-template/ah.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/third_party/htmlcompressor/views/amp-template/ah.php b/application/third_party/htmlcompressor/views/amp-template/ah.php index a025b3d2..bc6474ec 100644 --- a/application/third_party/htmlcompressor/views/amp-template/ah.php +++ b/application/third_party/htmlcompressor/views/amp-template/ah.php @@ -105,7 +105,7 @@ -
+@AMP-ADDTHIS@
@AMP-GOOGLE-ANALYTICS@ From 4d1e5718258a974e2e56fbc6a1319ff16cd81955 Mon Sep 17 00:00:00 2001 From: cyc Date: Thu, 1 Nov 2018 16:06:32 +0800 Subject: [PATCH 2/8] =?UTF-8?q?=E4=BF=AE=E6=94=B9AH=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E6=A0=87=E7=AD=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../third_party/htmlcompressor/views/amp-template/ah.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/third_party/htmlcompressor/views/amp-template/ah.php b/application/third_party/htmlcompressor/views/amp-template/ah.php index bc6474ec..3d67e1f9 100644 --- a/application/third_party/htmlcompressor/views/amp-template/ah.php +++ b/application/third_party/htmlcompressor/views/amp-template/ah.php @@ -15,7 +15,7 @@ - +@AMP-ADDTHIS-SOURCE@ @@ -101,7 +102,7 @@ - +
From 76b07703d4b4f0466d3602931a1758304bf89ba5 Mon Sep 17 00:00:00 2001 From: cyc Date: Thu, 8 Nov 2018 10:02:26 +0800 Subject: [PATCH 6/8] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E8=AE=B0=E5=BD=95=E6=90=BA=E7=A8=8B=E6=8E=A5=E5=8F=A3=E7=9B=B8?= =?UTF-8?q?=E5=BA=94=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/third_party/ctrip/controllers/ctrip_train.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/application/third_party/ctrip/controllers/ctrip_train.php b/application/third_party/ctrip/controllers/ctrip_train.php index 41509649..0262da0e 100644 --- a/application/third_party/ctrip/controllers/ctrip_train.php +++ b/application/third_party/ctrip/controllers/ctrip_train.php @@ -65,10 +65,17 @@ class ctrip_train extends CI_Controller{ $url = JSONRETURN.'SearchS2S/?From='.urlencode($from).'&To='.urlencode($to).'&DepartDate='.$date.'&User='.DATAUSER.'&TimeStamp='.$TimeStamp.'&Sign='.$Sign; + $api_start_time = microtime(true); + //获取数据 $ResponseJson = post_ctrip($url,'','GET'); + $api_end_time = microtime(true); + $ResponseData = json_decode($ResponseJson); + $api_responsive_time = $api_end_time - $api_start_time; + + log_message('error','ctrip_trian|status:'.$ResponseData->ResponseStatus->Ack.'|相应时间:'.$api_responsive_time); //定义返回的json $ReturnData = new stdClass(); From b1329b2dada809904420fd895a9ddd2e6b0edf0e Mon Sep 17 00:00:00 2001 From: cyc Date: Thu, 8 Nov 2018 10:32:12 +0800 Subject: [PATCH 7/8] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E8=BF=87=E7=A8=8B=E9=81=BF=E5=85=8D=E5=87=BA=E7=8E=B0php?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ctrip/controllers/ctrip_train.php | 28 +++++++++++++++---- 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/application/third_party/ctrip/controllers/ctrip_train.php b/application/third_party/ctrip/controllers/ctrip_train.php index 0262da0e..ee7b6dbb 100644 --- a/application/third_party/ctrip/controllers/ctrip_train.php +++ b/application/third_party/ctrip/controllers/ctrip_train.php @@ -43,7 +43,8 @@ class ctrip_train extends CI_Controller{ $TrainNo = $this->input->get_post('TrainNo'); if(!$date || !$from || !$to){ - exit('传参错误!'); + header("HTTP/1.1 404 Not Found"); + exit('{"httpstatus":404,"data":{"seven":false,"cache":false,"result":[],"map":{}}}'); }else{ $isCache = false; $iseven = false; @@ -55,10 +56,19 @@ class ctrip_train extends CI_Controller{ $iseven = true; } - //转换三字码为中文 - $from = $this->ctrip_model->ReplaceCodeToName($from)->station_name; - $to = $this->ctrip_model->ReplaceCodeToName($to)->station_name; - + //转换三字码为中文 + $FromCode = $this->ctrip_model->ReplaceCodeToName($from); + $ToCode = $this->ctrip_model->ReplaceCodeToName($to); + + + if(!$FromCode || !$ToCode){ + header("HTTP/1.1 404 Not Found"); + exit('{"httpstatus":404,"data":{"seven":false,"cache":false,"result":[],"map":{}}}'); + }else{ + $from = $FromCode->station_name; + $to = $ToCode->station_name; + } + //生成请求链接 $TimeStamp = time(); $Sign = md5($TimeStamp.DATAKEY); @@ -74,8 +84,14 @@ class ctrip_train extends CI_Controller{ $ResponseData = json_decode($ResponseJson); $api_responsive_time = $api_end_time - $api_start_time; + //print_r($ResponseData);die(); + + if(empty($ResponseData->Trains)){ + log_message('error','ctrip_trian|status:trains is empty |相应时间:'.$api_responsive_time); + }else{ + log_message('error','ctrip_trian|status:'.$ResponseData->ResponseStatus->Ack.'|相应时间:'.$api_responsive_time); + } - log_message('error','ctrip_trian|status:'.$ResponseData->ResponseStatus->Ack.'|相应时间:'.$api_responsive_time); //定义返回的json $ReturnData = new stdClass(); From 4e7968e1ee543b127bbcbd1fd90a516b5cb8a8b9 Mon Sep 17 00:00:00 2001 From: cyc Date: Thu, 8 Nov 2018 13:50:59 +0800 Subject: [PATCH 8/8] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=9B=BD=E5=AE=B6?= =?UTF-8?q?=E9=80=89=E6=8B=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/third_party/order/views/gm/confirm_order.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/application/third_party/order/views/gm/confirm_order.php b/application/third_party/order/views/gm/confirm_order.php index 1a973471..31578924 100644 --- a/application/third_party/order/views/gm/confirm_order.php +++ b/application/third_party/order/views/gm/confirm_order.php @@ -159,7 +159,6 @@ - @@ -169,7 +168,9 @@ - +