|
|
|
@ -59,6 +59,10 @@ class webgetbokun extends CI_Controller
|
|
|
|
|
//1.根据城市名称获取对应的is_id作为 父类ID
|
|
|
|
|
$is_id = $this->get_isid_byCity($CityName);
|
|
|
|
|
|
|
|
|
|
if ($is_id == 0){
|
|
|
|
|
return ;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//2.根据$activityid 抓取接口数据
|
|
|
|
|
$activityDeatil = json_decode($this->bokun_lib->get_activity_detail($activityid));
|
|
|
|
|
$title = $activityDeatil->title;
|
|
|
|
@ -297,7 +301,7 @@ class webgetbokun extends CI_Controller
|
|
|
|
|
if (isset($row)) {
|
|
|
|
|
$result = $row->is_id;
|
|
|
|
|
} else {
|
|
|
|
|
$result = $this->tpBokun_model->is_topId;
|
|
|
|
|
$result = 0 ; //$this->tpBokun_model->is_topId;
|
|
|
|
|
}
|
|
|
|
|
return $result;
|
|
|
|
|
}
|
|
|
|
@ -425,6 +429,59 @@ class webgetbokun extends CI_Controller
|
|
|
|
|
echo "无接口数据!\r\n";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 这里是在cht的信息平台运行的接口 */
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @description: 获取CH那边的产品生成接口数据
|
|
|
|
|
* @param {type}
|
|
|
|
|
* @return:
|
|
|
|
|
* @Date Changed:
|
|
|
|
|
*/
|
|
|
|
|
function getChtTours($strcity=""){
|
|
|
|
|
if ($strcity==""){
|
|
|
|
|
$strcity = "beijing,guilin,chengdu,shanghai,xian,zhangjiajie,huangshan,yunnan";
|
|
|
|
|
}
|
|
|
|
|
$result = array();
|
|
|
|
|
//城市解析
|
|
|
|
|
$arrCity = explode(",",$strcity);
|
|
|
|
|
$strParam = "";
|
|
|
|
|
foreach ($arrCity as $city){
|
|
|
|
|
$strParam.="'/day-tours/".strtolower(str_replace(" ","-",$city))."/',";
|
|
|
|
|
}
|
|
|
|
|
$strParam = trim($strParam,",");
|
|
|
|
|
//$strParam = "/beijing/"; //本地测试
|
|
|
|
|
//传递
|
|
|
|
|
$list = $this->tpBokun_model->getChtTours($strParam);
|
|
|
|
|
if ($list){
|
|
|
|
|
|
|
|
|
|
foreach ($list as $Item){
|
|
|
|
|
$data["ic_id"]=$Item->ic_id;
|
|
|
|
|
$data["ic_url"]=$Item->ic_url;
|
|
|
|
|
$data["ic_title"]=$Item->ic_title;
|
|
|
|
|
|
|
|
|
|
//meta属性
|
|
|
|
|
$listmeta = $this->tpBokun_model->getChtToursMeta($Item->ic_id);
|
|
|
|
|
if ($listmeta){
|
|
|
|
|
foreach($listmeta as $meta){
|
|
|
|
|
$MetaData["im_key"]=$meta->im_key;
|
|
|
|
|
$MetaData["im_value"]=$meta->im_value;
|
|
|
|
|
$data["meta"][]=$MetaData;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$result[]=$data;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
if ($result){
|
|
|
|
|
echo json_encode($result);
|
|
|
|
|
}else{
|
|
|
|
|
echo json_encode(array("status"=>"none"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* End of file webgetbokun.php */
|
|
|
|
|