...
|
...
|
@@ -135,11 +135,18 @@ class StarController extends HomeBaseController |
|
|
|
|
|
//网红美景更多
|
|
|
public function getMoreScenery(){
|
|
|
$page = $this->request->param('page',1,'intval');
|
|
|
$city_id = $this->request->param('city_id',0,'intval');
|
|
|
//查询城市名称
|
|
|
$city_name = $this->getCityName($city_id);
|
|
|
$this->assign('city_name',$city_name);
|
|
|
|
|
|
$position['category_id'] = CityCategoryModel::whmj;
|
|
|
$position['city_id'] = $city_id;
|
|
|
$field = 'id,thumbnail,post_title,post_hits,post_favorites';
|
|
|
$res = $this->getChildArticlePage($position,$field,$page);
|
|
|
$this->assign('res',$res);
|
|
|
$res = $this->getChildArticlePage($position,$field);
|
|
|
$this->assign('res',$res['data']);
|
|
|
$this->assign('page',$res['page']);
|
|
|
return $this->fetch();
|
|
|
}
|
|
|
|
|
|
//网红美景详情
|
...
|
...
|
@@ -149,21 +156,26 @@ class StarController extends HomeBaseController |
|
|
$res = $this->getDetail($id,$field);
|
|
|
if($res){
|
|
|
$more = json_decode($res['more'],true);
|
|
|
$res['audio'] = isset($more['audio']) && !empty($more['audio'])?$more['audio']:'';
|
|
|
$res['image_url'] = isset($more['photos']) && !empty($more['photos'])?$more['photos'][0]['url']:'';
|
|
|
}
|
|
|
$this->assign('res',$res);
|
|
|
return $this->fetch();
|
|
|
}
|
|
|
|
|
|
//异域珍馐更多
|
|
|
public function getMoreFood(){
|
|
|
$page = $this->request->param('page',1,'intval');
|
|
|
$city_id = $this->request->param('city_id',0,'intval');
|
|
|
//查询城市名称
|
|
|
$city_name = $this->getCityName($city_id);
|
|
|
$this->assign('city_name',$city_name);
|
|
|
|
|
|
$position['category_id'] = CityCategoryModel::yyzx;
|
|
|
$position['city_id'] = $city_id;
|
|
|
$field = 'id,thumbnail,post_title,post_hits,post_favorites';
|
|
|
$res_top = $this->getChildArticle($position,$field,2);
|
|
|
$res = $this->getChildArticlePage($position,$field,$page);
|
|
|
$this->assign('res_top',$res_top);
|
|
|
$this->assign('res',$res);
|
|
|
$res = $this->getChildArticlePage($position,$field,10);
|
|
|
$this->assign('res',$res['data']);
|
|
|
$this->assign('page',$res['page']);
|
|
|
return $this->fetch();
|
|
|
}
|
|
|
|
|
|
//异域珍馐详情
|
...
|
...
|
@@ -176,6 +188,7 @@ class StarController extends HomeBaseController |
|
|
$res['image_url'] = isset($more['photos']) && !empty($more['photos'])?$more['photos'][0]['url']:'';
|
|
|
}
|
|
|
$this->assign('res',$res);
|
|
|
return $this->fetch();
|
|
|
}
|
|
|
|
|
|
//良宿美寝更多
|
...
|
...
|
@@ -187,31 +200,41 @@ class StarController extends HomeBaseController |
|
|
|
|
|
$position['category_id'] = CityCategoryModel::lsmq;
|
|
|
$position['city_id'] = $city_id;
|
|
|
$field = 'id,thumbnail,post_title';
|
|
|
$field = 'id,thumbnail,post_title,post_excerpt';
|
|
|
$res = $this->getChildArticlePage($position,$field);
|
|
|
$this->assign('res',$res);
|
|
|
$this->assign('res',$res['data']);
|
|
|
$this->assign('page',$res['page']);
|
|
|
return $this->fetch();
|
|
|
}
|
|
|
|
|
|
//良宿美寝详情
|
|
|
public function getHotelDetail(){
|
|
|
$id = $this->request->param('id',0,'intval');
|
|
|
$field = 'id,thumbnail,post_title,post_excerpt,create_time,post_content,more';
|
|
|
$field = 'id,thumbnail,post_title,tel,url,address,post_excerpt,create_time,post_content,more';
|
|
|
$res = $this->getDetail($id,$field);
|
|
|
if($res){
|
|
|
$more = json_decode($res['more'],true);
|
|
|
$res['image_url'] = isset($more['photos']) && !empty($more['photos'])?$more['photos'][0]['url']:'';
|
|
|
$res['image_one'] = isset($more['photos']) && !empty($more['photos'])?$more['photos'][0]['url']:'';
|
|
|
$res['image_url'] = isset($more['photos']) && !empty($more['photos'])?$more['photos']:'';
|
|
|
}
|
|
|
$this->assign('res',$res);
|
|
|
return $this->fetch();
|
|
|
}
|
|
|
|
|
|
//活力生态更多
|
|
|
public function getMoreEcology(){
|
|
|
$page = $this->request->param('page',1,'intval');
|
|
|
$city_id = $this->request->param('city_id',0,'intval');
|
|
|
//查询城市名称
|
|
|
$city_name = $this->getCityName($city_id);
|
|
|
$this->assign('city_name',$city_name);
|
|
|
|
|
|
$position['category_id'] = CityCategoryModel::hlst;
|
|
|
$position['city_id'] = $city_id;
|
|
|
$field = 'id,thumbnail,post_title,post_excerpt';
|
|
|
$res = $this->getChildArticlePage($position,$field,$page);
|
|
|
$this->assign('res',$res);
|
|
|
$res = $this->getChildArticlePage($position,$field);
|
|
|
$this->assign('res',$res['data']);
|
|
|
$this->assign('page',$res['page']);
|
|
|
return $this->fetch();
|
|
|
}
|
|
|
|
|
|
//活力生态详情
|
...
|
...
|
@@ -224,6 +247,7 @@ class StarController extends HomeBaseController |
|
|
$res['image_url'] = isset($more['photos']) && !empty($more['photos'])?$more['photos'][0]['url']:'';
|
|
|
}
|
|
|
$this->assign('res',$res);
|
|
|
return $this->fetch();
|
|
|
}
|
|
|
|
|
|
//便利出行更多
|
...
|
...
|
|