...
|
...
|
@@ -27,8 +27,10 @@ class StarController extends HomeBaseController |
|
|
$field = 'id,thumbnail,post_excerpt,more';
|
|
|
$res_xqgs = $this->getChildArticle($position,$field,1);
|
|
|
foreach($res_xqgs as &$value){
|
|
|
$video = json_decode($value['more'],true);
|
|
|
$value['audio'] = $video['audio'];
|
|
|
$more = json_decode($value['more'],true);
|
|
|
if(isset($more['audio']) && !empty($more['audio'])){
|
|
|
$value['audio'] = $more['audio'];
|
|
|
}
|
|
|
}
|
|
|
$this->assign('res_xqgs',$res_xqgs);
|
|
|
|
...
|
...
|
@@ -119,6 +121,19 @@ class StarController extends HomeBaseController |
|
|
$this->assign('res',$res);
|
|
|
}
|
|
|
|
|
|
//网红美景详情
|
|
|
public function getSceneryDetail(){
|
|
|
$id = $this->request->param('id',0,'intval');
|
|
|
$field = 'id,thumbnail,post_title,post_excerpt,create_time,post_content,more';
|
|
|
$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);
|
|
|
}
|
|
|
|
|
|
//异域珍馐更多
|
|
|
public function getMoreFood(){
|
|
|
$page = $this->request->param('page',1,'intval');
|
...
|
...
|
@@ -130,6 +145,18 @@ class StarController extends HomeBaseController |
|
|
$this->assign('res',$res);
|
|
|
}
|
|
|
|
|
|
//异域珍馐详情
|
|
|
public function getFoodDetail(){
|
|
|
$id = $this->request->param('id',0,'intval');
|
|
|
$field = 'id,thumbnail,post_title,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']:'';
|
|
|
}
|
|
|
$this->assign('res',$res);
|
|
|
}
|
|
|
|
|
|
//良宿美寝更多
|
|
|
public function getMoreHotel(){
|
|
|
$page = $this->request->param('page',1,'intval');
|
...
|
...
|
@@ -139,6 +166,18 @@ class StarController extends HomeBaseController |
|
|
$this->assign('res',$res);
|
|
|
}
|
|
|
|
|
|
//良宿美寝详情
|
|
|
public function getHotelDetail(){
|
|
|
$id = $this->request->param('id',0,'intval');
|
|
|
$field = 'id,thumbnail,post_title,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']:'';
|
|
|
}
|
|
|
$this->assign('res',$res);
|
|
|
}
|
|
|
|
|
|
//活力生态更多
|
|
|
public function getMoreEcology(){
|
|
|
$page = $this->request->param('page',1,'intval');
|
...
|
...
|
@@ -148,6 +187,18 @@ class StarController extends HomeBaseController |
|
|
$this->assign('res',$res);
|
|
|
}
|
|
|
|
|
|
//活力生态详情
|
|
|
public function getEcologyDetail(){
|
|
|
$id = $this->request->param('id',0,'intval');
|
|
|
$field = 'id,thumbnail,post_title,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']:'';
|
|
|
}
|
|
|
$this->assign('res',$res);
|
|
|
}
|
|
|
|
|
|
//便利出行更多
|
|
|
public function getMoreTravel(){
|
|
|
$page = $this->request->param('page',1,'intval');
|
...
|
...
|
@@ -156,4 +207,38 @@ class StarController extends HomeBaseController |
|
|
$res = $this->getChildArticlePage($position,$field,$page);
|
|
|
$this->assign('res',$res);
|
|
|
}
|
|
|
|
|
|
//便利出行详情
|
|
|
public function getTravelDetail(){
|
|
|
$id = $this->request->param('id',0,'intval');
|
|
|
$field = 'id,thumbnail,post_title,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']:'';
|
|
|
}
|
|
|
$this->assign('res',$res);
|
|
|
}
|
|
|
|
|
|
//获取文章详情
|
|
|
public function getDetail($id,$field){
|
|
|
$pre = CityCategoryModel::pre;
|
|
|
$res = Db::table($pre.'portal_post')
|
|
|
->where(['id'=>$id,'delete_time'=>0])
|
|
|
->field($field)
|
|
|
->find();
|
|
|
return $res;
|
|
|
}
|
|
|
|
|
|
//星球故事详情
|
|
|
public function getStoryDetail(){
|
|
|
$id = $this->request->param('id',0,'intval');
|
|
|
$field = 'id,thumbnail,post_title,post_excerpt,create_time,post_content,more';
|
|
|
$res = $this->getDetail($id,$field);
|
|
|
if($res){
|
|
|
$more = json_decode($res['more'],true);
|
|
|
$res['audio'] = isset($more['audio']) && !empty($more['audio'])?$more['audio']:'';
|
|
|
}
|
|
|
$this->assign('res',$res);
|
|
|
}
|
|
|
} |
...
|
...
|
|