diff --git a/application/controllers/information.php b/application/controllers/information.php index 3cc5b5fa..e7008e67 100644 --- a/application/controllers/information.php +++ b/application/controllers/information.php @@ -678,6 +678,33 @@ class Information extends CI_Controller } } + // 集合页面反馈标签 + $feedback_city_array = []; + preg_match_all('^^', $information->ic_content, $feedback_city_array); + if (!empty($feedback_city_array)) { + foreach ($feedback_city_array[0] as $index => $tag_name) { + $city_name_string = $feedback_city_array[1][$index]; + $city_name_list = explode(',', $city_name_string); + $feedback_city_list = []; + foreach ($city_name_list as $index => $city_name) { + $feedback_list = $this->Feedback_model->get_feedback_by_city_name($city_name, 5); + $data_name = str_replace(" ", "_", $city_name); + $feedback_city_list[$data_name] = $feedback_list; + } + + $feedback_city_content = $this->load->view( + 'mobile_first/ch-feedback-city-list', + $feedback_city_list, + true + ); + $information->ic_content = str_replace( + $tag_name, + $feedback_city_content, + $information->ic_content + ); + } + } + $feedback_newest = $this->Feedback_model->get_feedback_newest(); $feedback_newest_content = $this->load->view( $template_path . '-feedback-newest', @@ -705,7 +732,19 @@ class Information extends CI_Controller //火车票搜索框添加 -- zp if ($information->is_parent_id == "278008234") { //本地测试的火车父类ID为:278035939 。网前为:278008234 - $template_TrainSearch = $this->load->view($template_path . '-train-detail', null, true); + $meta_train_city = get_meta($information->ic_id, 'meta_train_city'); //默认的出发及目的地城市 , beijing|shanghai + $data_TrainCity=array(); + $data_TrainCity["from"]=""; + $data_TrainCity["to"]=""; + if (!empty($meta_train_city)){ + if (strpos($meta_train_city,'|')!==false){ + $arrTrainCity = explode('|',$meta_train_city); + $data_TrainCity["from"] = $arrTrainCity[0]; + $data_TrainCity["to"] = $arrTrainCity[1]; + } + } + + $template_TrainSearch = $this->load->view($template_path . '-train-detail', $data_TrainCity, true); $template = str_replace('', $template_TrainSearch, $template); } @@ -951,6 +990,14 @@ class Information extends CI_Controller $main_css_string = compress_css(GET_HTTP('https://proxy-data.chinahighlights.com/css/mobile-first.css')); } $template = str_replace('', '', $template); + + // /china-trains/ 节点 + if ($information->is_parent_id == "278008234") { + $template = str_replace( + '', + '', + $template); + } //额外样式 $meta_addon_css = get_meta($information->ic_id, 'meta_addon_css'); if (!empty($meta_addon_css)) { @@ -1422,7 +1469,7 @@ class Information extends CI_Controller $information->ic_content = str_replace('', $info_page_form_content, $information->ic_content); } else { $tour_form_content = $this->load->view( - $template_path . '-tour-form', + 'mobile_first/gh-tour-form', array('information' => $information, 'meta_product_code' => $meta_product_code), true ); @@ -1451,6 +1498,33 @@ class Information extends CI_Controller } } + // 集合页面反馈标签 + $feedback_city_array = []; + preg_match_all('^^', $information->ic_content, $feedback_city_array); + if (!empty($feedback_city_array)) { + foreach ($feedback_city_array[0] as $index => $tag_name) { + $city_name_string = $feedback_city_array[1][$index]; + $city_name_list = explode(',', $city_name_string); + $feedback_city_list = []; + foreach ($city_name_list as $index => $city_name) { + $feedback_list = $this->Feedback_model->get_feedback_by_city_name($city_name, 5); + $data_name = str_replace(" ", "_", $city_name); + $feedback_city_list[$data_name] = $feedback_list; + } + + $feedback_city_content = $this->load->view( + 'mobile_first/gh-feedback-city-list', + $feedback_city_list, + true + ); + $information->ic_content = str_replace( + $tag_name, + $feedback_city_content, + $information->ic_content + ); + } + } + $feedback_newest = $this->Feedback_model->get_feedback_newest(); $feedback_newest_content = $this->load->view( $template_path . '-feedback-newest', @@ -2711,4 +2785,4 @@ class Information extends CI_Controller echo json_encode($data); return true; } -} \ No newline at end of file +} diff --git a/application/third_party/ctmobilefirst/models/api_model.php b/application/third_party/ctmobilefirst/models/api_model.php index 320f264c..d38bdb29 100644 --- a/application/third_party/ctmobilefirst/models/api_model.php +++ b/application/third_party/ctmobilefirst/models/api_model.php @@ -294,7 +294,7 @@ class Api_model extends CI_Model { select * from ( SELECT ic_url,ic_url_title,ic_photo ,(select top 1 im_value from infoMetas where im_key='meta_addon_picture_mobile' and im_ic_id=ic_id) as pic2 - ,'2' as sortby + ,'2' as sortby , is_sort FROM dbo.infoContents inner join infoStructures on ic_id=is_ic_id WHERE is_sitecode='chinatravel' @@ -306,14 +306,14 @@ class Api_model extends CI_Model { SELECT ic_url,ic_url_title,ic_photo ,(select top 1 im_value from infoMetas where im_key='meta_addon_picture_mobile' and im_ic_id=ic_id) as pic2 - ,'1' as sortby + ,'1' as sortby ,is_sort FROM dbo.infoContents inner join infoStructures on ic_id=is_ic_id WHERE is_sitecode='chinatravel' and ic_status=1 and is_parent_id = ? ) allbt - order by sortby + order by sortby ,is_sort "; diff --git a/application/third_party/trainsystem/controllers/callback.php b/application/third_party/trainsystem/controllers/callback.php index e93edfca..b5f75a86 100644 --- a/application/third_party/trainsystem/controllers/callback.php +++ b/application/third_party/trainsystem/controllers/callback.php @@ -415,6 +415,33 @@ class callback extends CI_Controller{ } $msg = "退票成功:".$ctrip_backdata->returnResult->resultMsg."(".$returnSuccTime.",".$pintmsg.",预计退票退款:".$preRefundAmount.",手续费:".$sxfAmount.")"; $update_data->ErrorMsg=$msg; + + //退票手续费保存到数据库 + //翰特添加退款记录 + $returnticket = new stdClass(); + $return_order = $ctrip_backdata->returnResult->companyOrderId; + + $returnticket->TOC_VEI_SN = "28209"; + + //根据订单号获取cold_sn + $order_info = $this->train_system_model->get_order_info($return_order); + $cold_sn = $order_info->ts_cold_sn; + //print_r($order_info); + + //获取longElecNo(长电子订单号)用来判断是否是多张票 + $longElecNo=$ctrip_backdata->returnResult->longElecNo; + $returnSuccTime = $ctrip_backdata->returnResult->returnSuccTime; + + $memo = $return_order.'_长电子订单号:'. $longElecNo . '_' . $returnSuccTime; //退款集合信息 + $returnticket->TOC_Memo = $memo; + $returnticket->TOC_COLD_SN = $cold_sn; + $returnticket->TOC_TrainNumber = $order_info->ts_checi; + $returnticket->TOC_DepartureDate = $order_info->ts_startdate; + $returnticket->TOC_TicketCost = -$sxfAmount>0?$sxfAmount:15; + //print_r($add_train_payment_data);die(); + $this->BIZ_train_model->returnticket_train($returnticket); + + }else{ //退票失败 $update_data->OrderStatus = '8'; diff --git a/application/third_party/trainsystem/controllers/pages.php b/application/third_party/trainsystem/controllers/pages.php index dda502bd..bddd6fbe 100644 --- a/application/third_party/trainsystem/controllers/pages.php +++ b/application/third_party/trainsystem/controllers/pages.php @@ -6,6 +6,9 @@ class pages extends CI_Controller{ public function __construct(){ parent::__construct(); + //$this->load->library("permissiontrain"); + //$this->permissiontrain->is_admin(); + //$this->permission->is_admin(); $this->load->model("train_system_model"); $this->load->model("BIZ_train_model"); $this->load->helper('train'); diff --git a/application/third_party/trainsystem/models/BIZ_train_model.php b/application/third_party/trainsystem/models/BIZ_train_model.php index 2c449e91..e24d4da0 100644 --- a/application/third_party/trainsystem/models/BIZ_train_model.php +++ b/application/third_party/trainsystem/models/BIZ_train_model.php @@ -263,6 +263,36 @@ class BIZ_train_model extends CI_Model { $query = $this->HT->query($sql,array($data->TOC_COLD_SN,"%".$data->TOC_Memo."%","退款: ".$data->TOC_Memo,$data->TOC_COLD_SN,$data->TOC_TrainNumber,$data->TOC_DepartureDate,$data->TOC_TicketCost,$data->TOC_VEI_SN)); + } + + + //新增退款记录 refund + public function returnticket_train($data){ + //主表ID,下面两个地方用到,所以先筛选出来,不知道能不能通过合并提高效率 + $sql="SELECT COLD_COLI_SN FROM BIZ_ConfirmLineDetail WHERE COLD_SN=?"; + $query=$this->HT->query($sql,$data->TOC_COLD_SN); + $query=$query->result(); + $CCSN=$query[0]->COLD_COLI_SN; + //退票手续费记录 + $sql="IF NOT EXISTS( + SELECT TOP 1 1 FROM BIZ_TrainOrderCost + WHERE TOC_COLD_SN = ? AND TOC_Memo like ? + ) + INSERT INTO BIZ_TrainOrderCost( + TOC_Memo, + TOC_CreateDate, + TOC_COLI_SN, + TOC_COLD_SN, + TOC_TrainNumber, + TOC_DepartureDate, + TOC_TicketCost, + TOC_WL, + TOC_VEI_SN + ) + VALUES(?,getdate(),{$CCSN},?,?,?,?,(SELECT isnull(COLI_OPI_ID,29) FROM BIZ_ConfirmLineInfo WHERE COLI_SN={$CCSN}),?)"; + $query = $this->HT->query($sql,array($data->TOC_COLD_SN,"%".$data->TOC_Memo."%","退票: ".$data->TOC_Memo,$data->TOC_COLD_SN,$data->TOC_TrainNumber,$data->TOC_DepartureDate,$data->TOC_TicketCost,$data->TOC_VEI_SN)); + + } public function update_cold_planvei_sn($cold_sn,$planveiSn){ diff --git a/application/views/mobile_first/ah-pc.php b/application/views/mobile_first/ah-pc.php index 07d5dde6..2e29439c 100644 --- a/application/views/mobile_first/ah-pc.php +++ b/application/views/mobile_first/ah-pc.php @@ -128,8 +128,7 @@ Couple
  • 12 Days
  • -
  • 8 - Days
  • +
  • 8 Days
  • @@ -157,37 +156,60 @@ @@ -422,6 +444,10 @@
    +

    Where Can We Take You Today?

    - -
    +