TS移动优先上线测试版

master
赵鹏 1 year ago
parent a9983bada4
commit 2130aeb7c4

@ -3673,7 +3673,7 @@ class Information extends CI_Controller
$ic_content = preg_replace('/<h1>(.*)<\/h1>/i', $crumb . "\r\n" . '<H1>$1</H1>' . "\r\n" . $str_author . "\r\n", $ic_content, 1);
//图片加延迟
$ic_content = $this->html_optimize_lib->set_lazy_loader($ic_content, 'https://data.trainspread.com/images/grey.gif');
$ic_content = $this->html_optimize_lib->set_lazy_loader($ic_content, 'https://wwww.trainspread.com/images/grey.gif');
$ic_content = $this->html_optimize_lib->set_image_size($ic_content);
@ -3912,7 +3912,7 @@ class Information extends CI_Controller
$DayTripData["productCode"] = $productCode;
$DayTripData["picture_mobile"] = get_meta($information->ic_id, 'meta_addon_picture_mobile');
$DayTripData["picture_pc"] = get_meta($information->ic_id, 'meta_addon_picture');
$DayTripData["TITLE"] = $information->ic_seo_title;
$DayTripData["TITLE"] = $information->ic_title;
//成人,儿童,婴儿的年龄显示信息
$AdultMsg = $this->infoBokunData_model->getBokunMetaList($information->ic_id, "AdultMsg");
if ($AdultMsg) {
@ -3953,9 +3953,92 @@ class Information extends CI_Controller
$InfoData = new stdClass(); //传递用来计算的信息平台数据
$MinTravelers = get_meta($information->ic_id, 'meta_trippest_limitperson');
$InfoData->MinTravelers = $MinTravelers == null ? 0 : $MinTravelers;
$InfoData->MinTravelers = $MinTravelers == null ? 0 : $MinTravelers;
//选项一
$TsOption1 = get_meta($information->ic_id, 'meta_trainspread_option1');
if ( $TsOption1 != false ){
$arrOption = explode(",", $TsOption1);
$arrItem = array();
$num = count($arrOption);
for ($i = 0; $i < $num; $i++) {
if ($i==0){
$InfoData->Option1->OptionName = $arrOption[$i];
}else{
$arrItemClass = new stdClass();
$arrItemClass->id = $i-1;
$arrItemClass->value = $arrOption[$i];
$arrItem[$i-1] = $arrItemClass;
}
}
$InfoData->Option1->ItemList = $arrItem;
}else{
$InfoData->Option1 = $TsOption1;
}
//Package
$TsPackage = get_meta($information->ic_id, 'meta_trippest_package');
if ($TsPackage!=false){
$arrOption = explode("|", $TsPackage);
$arrItem = array();
$num = count($arrOption);
for ($i = 0; $i < $num; $i++) {
if ($i==0){
$InfoData->Package->PackageName = $arrOption[$i];
}
else{
$arr_Item = explode(",", $arrOption[$i]);
for ($j=0;$j<count($arr_Item);$j++){
$arrItemClass = new stdClass();
$arrItemClass->id = $i;
$arrItemClass->ItemName = $arr_Item[0];
$arrItemClass->ItemAdult = $arr_Item[1];
$arrItemClass->ItemChild = $arr_Item[2];
$arrItem[$i-1] = $arrItemClass;
}
}
}
$InfoData->Package->ItemList = $arrItem;
}else{
$InfoData->Package = $TsPackage;
}
$DayTripData["InfoData"] = $InfoData;
//选项二
$TsOption2 = get_meta($information->ic_id, 'meta_trainspread_option2');
if ( $TsOption2 != false ){
$arrOption = explode(",", $TsOption2);
$arrItem = array();
$num = count($arrOption);
for ($i = 0; $i < $num; $i++) {
if ($i==0){
$InfoData->Option2->OptionName = $arrOption[$i];
}else{
$arrItemClass = new stdClass();
$arrItemClass->id = $i-1;
$arrItemClass->value = $arrOption[$i];
$arrItem[$i-1] = $arrItemClass;
}
}
$InfoData->Option2->ItemList = $arrItem;
}else{
$InfoData->Option2 = $TsOption2;
}
//附加选项
$t_Type = get_meta($information->ic_id, "meta_trippest_type");
if ($t_Type) {
$InfoData->t_Type = $t_Type;
} else {
$InfoData->t_Type = "general";
}
$t_excludedate = get_meta($information->ic_id, "meta_trippest_excludedate");
$t_includedate = get_meta($information->ic_id, "meta_trippest_includedate");
$t_excludemonth = get_meta($information->ic_id, "meta_trippest_excludemonth");
$InfoData->t_excludedate = $t_excludedate;
$InfoData->t_includedate = $t_includedate;
$InfoData->t_excludemonth = $t_excludemonth;
$InfoData->t_hoteladdress = get_meta($information->ic_id, "meta_trippest_hoteladdress");
$DayTripData["InfoData"] = $InfoData; //传递信息平台数据
$linktour = get_meta($information->ic_id, 'meta_trainspread_linktour'); //关联线路
if (!empty($linktour)){

@ -455,6 +455,7 @@ class Apits_model extends CI_Model {
,PAG_GuideLan
,PAG2_TimeDetail
,p1.PAG_SourceType
,PAG2_Summary
FROM dbo.BIZ_PackageInfo P1 INNER JOIN
dbo.BIZ_PackageInfo2 p2 ON P1.PAG_SN = p2.PAG2_PAG_SN INNER JOIN
dbo.CItyInfo2 ON P1.PAG_CII_SN = dbo.CItyInfo2.CII2_CII_SN AND

@ -1,19 +1,18 @@
<div class="flex-box m-bottom50">
<div class="tours-pic">
<?php if ($device == "pc") { ?>
<img src="<?php echo $picture_pc ?>" class="img-responsive" width="750" height="460" alt="<?php echo $TITLE ?>">
<?php } else { ?>
<img src="<?php echo $picture_mobile ?>" class="img-responsive" width="360" height="330" alt="<?php echo $TITLE ?>">
<?php } ?>
<div class="tourspic-text">
<ul>
<li><span class="duration"></span><?php echo $TourData->PAG_NeedTime ==""?"":"Duration:".$TourData->PAG_NeedTime." hours" ?></li>
<li><span class="departure"></span>Departure:Daily</li>
<li><span class="travelers"></span><?php echo $InfoData->MinTravelers>0?"Min Travelers:".$InfoData->MinTravelers." Pax" : "Min Travelers:NO Limit" ?></li>
</ul>
</div>
<div class="flex-box m-bottom50">
<div class="tours-pic">
<?php if ($device == "pc") { ?>
<img src="<?php echo $picture_pc ?>" class="img-responsive" width="750" height="460" alt="<?php echo $TITLE ?>">
<?php } else { ?>
<img src="<?php echo $picture_mobile ?>" class="img-responsive" width="360" height="330" alt="<?php echo $TITLE ?>">
<?php } ?>
<div class="tourspic-text">
<ul>
<li><span class="duration"></span><?php echo $TourData->PAG_NeedTime ==""?"":"Duration:".$TourData->PAG_NeedTime." hours" ?></li>
<li><span class="departure"></span>Departure:Daily</li>
<li><span class="travelers"></span><?php echo $InfoData->MinTravelers>0?"Min Travelers:".$InfoData->MinTravelers." Pax" : "Min Travelers:NO Limit" ?></li>
</ul>
</div>
</div>
<div class="container-right right-m">
<div class="right-check box-show">
<div class="rcheck-top">
@ -54,7 +53,7 @@
?>
<div class="rcheck-input"><span class="f-name"></span>
<select name="Adults_Num" id="Adults_Num" class="form-control">
<option value="0" selected="selected"><?php echo $show_Othermsg ?></option>
<option value="1" selected="selected"><?php echo $show_Othermsg ?></option>
<option value="1">1 </option>
<option value="2">2 </option>
<option value="3">3 </option>
@ -80,7 +79,7 @@
<?php } else { ?>
<div class="rcheck-input"><span class="f-name"></span>
<select name="Adults_Num" id="Adults_Num" class="form-control">
<option value="0" selected="selected">Adult (<?php echo $AdultMsg != null ? $AdultMsg : $Other_Msg ?>)</option>
<option value="1" selected="selected">Adult (<?php echo $AdultMsg != null ? $AdultMsg : $Other_Msg ?>)</option>
<option value="1">1 </option>
<option value="2">2 </option>
<option value="3">3 </option>
@ -161,7 +160,7 @@
} else { ?>
<div class="rcheck-input"><span class="f-name"></span>
<select name="Adults_Num" id="Adults_Num" class="form-control">
<option value="0" selected="selected">Adults(Age12+)</option>
<option value="1" selected="selected">Adults(Age12+)</option>
<option value="1">1 </option>
<option value="2">2 </option>
<option value="3">3 </option>
@ -212,111 +211,98 @@
<?php } ?>
<div class="rcheck-input">
<a href="javascript:;" class="btn btn-red block" role="button">Check Avalibility</a>
<a href="javascript:;" class="btn btn-red block" role="button" id="js_RefreshTourStatus">Check Avalibility</a>
</div>
<input type="hidden" name="InfoData" id="InfoData" value="<?php echo json_encode($InfoData) ?>" />
<input type="hidden" name = "TourData" id = "TourData" value="<?php echo json_encode($TourData) ?>" />
<input type="hidden" name="InfoData" id="InfoData" value="<?php echo htmlspecialchars(json_encode($InfoData)) ?>" />
<input type="hidden" name = "TourData" id = "TourData" value="<?php echo htmlspecialchars(json_encode($TourData)) ?>" />
</div>
</div>
</div>
<script type="text/javascript">
var t_excludedate = '<?php echo $InfoData->t_excludedate ?>';
var t_includedate = '<?php echo $InfoData->t_includedate ?>';
var t_excludemonth = '<?php echo $InfoData->t_excludemonth ?>';
var t_limitperson = '<?php echo $InfoData->MinTravelers ?>';
var t_PAG_Scheme = '<?php echo $TourData->PAG_Scheme ?>';
</script>
</div>
<div class="toursgrade-box" id="product">
<div class="toursgrade-list active" role="button">
<div class="toursgrade-box" id="productlist" style="display: none;">
<?php foreach ($TourData->productlist as $Item) { //产品列表?>
<div class="toursgrade-list active js_tourselect" role="button">
<div class="toursgrade-left">
<label class="font24">
<input name="" type="radio" value="" checked="checked">
Seclce tours</label>
<?php echo $Item->productdetail->PAG2_Name ?></label>
<div class="grade-info">
<p>Shared Group tour of maximum 12 people. Join this Award Winning shared group food tour at sunset</p>
<p><?php echo $Item->productdetail->PAG2_Summary ?></p>
<?php if ($InfoData->Option1!=false) { //特殊选项一?>
<div class="grade-col grade-titme">
<?php
foreach ($InfoData->Option1->ItemList as $Option1_Item){
?>
<div class="flex-col col-label">
<input checked="CHECKED" class="mgc" id="r1" name="gender" type="radio" value="Mr.">
<label for="r1">10:00 AM</label>
</div>
<div class="flex-col col-label">
<input checked="CHECKED" class="mgc" id="r3" name="gender" type="radio" value="Mr.">
<label for="r3">10:00 AM</label>
</div>
<div class="flex-col col-label">
<input checked="CHECKED" class="mgc" id="r4" name="gender" type="radio" value="Mr.">
<label for="r4">10:00 AM</label>
</div>
<div class="flex-col col-label">
<input checked="CHECKED" class="mgc" id="r5" name="gender" type="radio" value="Mr.">
<label for="r5">10:00 AM</label>
</div>
<div class="flex-col col-label">
<input checked="CHECKED" class="mgc" id="r6" name="gender" type="radio" value="Mr.">
<label for="r6">10:00 AM</label>
</div>
<div class="flex-col col-label not-btn">
<input checked="CHECKED" class="mgc" id="r7" name="gender" type="radio" value="Mr.">
<label for="r7">10:00 AM</label>
<input class="mgc" id="Option1_<?php echo $Item->productdetail->PAG_SN.'_'.$Option1_Item->id ?>" name="<?php echo 'Option1_'.$Item->productdetail->PAG_SN.'_'.$InfoData->Option1->OptionName ?>" type="radio" value="<?php echo $Option1_Item->value ?>">
<label for="Option1_<?php echo $Item->productdetail->PAG_SN.'_'.$Option1_Item->id ?>"><?php echo $Option1_Item->value ?></label>
</div>
<?php } ?>
</div>
<?php } ?>
<?php if ($InfoData->Package!=false) {?>
<div class="grade-col grade-city">
<?php
foreach ($InfoData->Package->ItemList as $Package_Item){
?>
<div class="flex-col col-label">
<input checked="CHECKED" class="mgc" id="r8" name="gender" type="radio" value="Mr.">
<label for="r8">Guilin Railway Station- Yangshuo Railway Station</label>
</div>
<div class="flex-col col-label not-btn">
<input checked="CHECKED" class="mgc" id="r9" name="gender" type="radio" value="Mr.">
<label for="r9">Guilin - Yangshuo</label>
<input class="mgc" id="Package_<?php echo $Item->productdetail->PAG_SN.'_'.$Package_Item->id ?>" name="<?php echo 'Package_'.$Item->productdetail->PAG_SN.'_'.$InfoData->Package->PackageName ?>" type="radio" value="<?php echo $Package_Item->ItemName.','.$Package_Item->ItemAdult.','.$Package_Item->ItemChild ?>">
<label for="Package_<?php echo $Item->productdetail->PAG_SN.'_'.$Package_Item->id ?>"><?php echo $Package_Item->ItemName ?></label>
</div>
<?php } ?>
</div>
<?php } ?>
<?php if ($InfoData->Option2!=false) {?>
<div class="grade-col grade-day">
<?php
foreach ($InfoData->Option2->ItemList as $Option2_Item){
?>
<div class="flex-col col-label">
<input checked="CHECKED" class="mgc" id="r10" name="gender" type="radio" value="Mr.">
<label for="r10">Morning</label>
</div>
<div class="flex-col col-label">
<input checked="CHECKED" class="mgc" id="r11" name="gender" type="radio" value="Mr.">
<label for="r11">Noon</label>
</div>
<div class="flex-col col-label not-btn">
<input checked="CHECKED" class="mgc" id="r12" name="gender" type="radio" value="Mr.">
<label for="r12">Evening</label>
<label for="r12">Evening</label>
<input class="mgc" id="Option2_<?php echo $Item->productdetail->PAG_SN.'_'.$Option2_Item->id ?>" name="<?php echo 'Option2_'.$Item->productdetail->PAG_SN.'_'.$InfoData->Option2->OptionName ?>" type="radio" value="<?php echo $Option2_Item->value ?>">
<label for="Option2_<?php echo $Item->productdetail->PAG_SN.'_'.$Option2_Item->id ?>"><?php echo $Option2_Item->value ?></label>
</div>
<?php } ?>
</div>
<?php } ?>
</div>
</div>
<div class="toursgrade-right">
<div class="grade-price">
<div class="gradeprice-box">
<div class="grade-totalprice"><strong class="font24">$388.50</strong></div>
<div class="gradeprice-pricedown">1 Adult x $122.10<br>
3 Children x $88.80</div>
<div class="grade-totalprice"><strong class="font24 js_showTotalPrice">$0</strong></div>
<div class="gradeprice-pricedown js_showPeopleList">1 Adult x $0<br>
1 Children x $0</div>
</div>
</div>
<div class="grade-btn"><a href="#" class="btn btn-red block" role="button">Book now</a></div>
</div>
</div>
<div class="toursgrade-list" role="button">
<div class="toursgrade-left">
<label class="font24">
<input name="" type="radio" value="">
Seclce tours</label>
<div class="grade-info">
<p>Shared Group tour of maximum 12 people. Join this Award Winning shared group food tour at sunset</p>
<div class="">
<button data-automation="start_time" type="button" class="chip__ifUI selected__eXqu primary__q2qK"><span class="chipLabel__WFN7">10:00 AM</span></button>
<div class="col-label">
<input checked="CHECKED" class="mgc" id="r2" name="gender" type="radio" value="Mr.">
<label for="r2">10:00 AM</label>
</div>
</div>
</div>
</div>
<div class="toursgrade-right">
<div class="grade-price">
<div class="gradeprice-box">
<div class="grade-totalprice"><strong class="font24">$388.50</strong></div>
<div class="gradeprice-pricedown">1 Adult x $122.10<br>
3 Children x $88.80</div>
</div>
<div class="grade-btn">
<a href="javascript:;" class="btn btn-red block js_select" role="button">Book now</a>
<input type="hidden" class="js_PAG_Code" value="<?php echo $Item->productdetail->PAG_Code ?>" />
<?php
$selectItemData = new stdClass();
$selectItemData->PAG_SN = $Item->productdetail->PAG_SN;
$selectItemData->PAG_Code = $Item->productdetail->PAG_Code;
$selectItemData->PAG2_Name = $Item->productdetail->PAG2_Name;
$selectItemData->CII2_Name = $Item->productdetail->CII2_Name;
$passPic = !empty($picture_mobile)?$picture_mobile:$picture_pc;
$selectItemData->pic = $passPic;
$selectItemData->t_Type = $InfoData->t_Type;
$selectItemData->t_hoteladdress = $InfoData->t_hoteladdress; //是否需要酒店
$selectItemData->PAG_Name = $TITLE; //大标题
?>
<input type="hidden" class="js_selectItemData" value="<?php echo htmlspecialchars(json_encode($selectItemData)) ?>" />
<input type="hidden" class="js_totalPrice" value="0" />
<input type="hidden" class="js_PackagePrice" value="0" />
<input type="hidden" class="js_PeopleList_Price" value="" />
</div>
<div class="grade-btn"><a href="#" class="btn btn-red block" role="button">Book now</a></div>
</div>
</div>
<?php }?>
</div>
Loading…
Cancel
Save