...
|
...
|
@@ -12,6 +12,7 @@ namespace app\portal\controller; |
|
|
|
|
|
use cmf\controller\HomeBaseController;
|
|
|
use app\portal\model\CityCategoryModel;
|
|
|
use app\portal\model\PortalPostModel;
|
|
|
use think\Db;
|
|
|
//星域秀场
|
|
|
class RegionController extends HomeBaseController
|
...
|
...
|
@@ -43,11 +44,13 @@ class RegionController extends HomeBaseController |
|
|
|
|
|
//星球故事
|
|
|
$position['category_id'] = CityCategoryModel::xqgs;
|
|
|
$field = 'id,thumbnail,post_excerpt,more';
|
|
|
$field = 'id,thumbnail,post_excerpt,more,excerpt';
|
|
|
$res_xqgs = $this->getChildArticle($position,$field,$this->index_limit);
|
|
|
foreach($res_xqgs as &$value){
|
|
|
$more = json_decode($value['more'],true);
|
|
|
$value['audio'] = isset($more['audio']) && !empty($more['audio'])?$more['audio']:'';
|
|
|
$contentModel = new PortalPostModel();
|
|
|
$value['excerpt'] = $contentModel->getPostContentAttr($value['excerpt']);
|
|
|
}
|
|
|
$this->assign('res_xqgs',$res_xqgs);
|
|
|
|
...
|
...
|
@@ -138,6 +141,11 @@ class RegionController extends HomeBaseController |
|
|
//星球影院更多(按照城市查询)
|
|
|
public function getMoreVideo(){
|
|
|
$city_id = $this->request->param('city_id',0,'intval');
|
|
|
//城市名字
|
|
|
$star = new StarController();
|
|
|
$cityName = $star->getCityName($city_id);
|
|
|
$this->assign('cityName',$cityName);
|
|
|
|
|
|
$position['city_id'] = $city_id;
|
|
|
$position['category_id'] = CityCategoryModel::xqyy;
|
|
|
$field = 'id,post_title,framing,release_time,city_id,more,thumbnail';
|
...
|
...
|
@@ -183,11 +191,13 @@ class RegionController extends HomeBaseController |
|
|
//星球故事更多
|
|
|
public function getMoreStory(){
|
|
|
$position['category_id'] = CityCategoryModel::xqgs;
|
|
|
$field = 'id,thumbnail,post_excerpt,more,create_time';
|
|
|
$field = 'id,thumbnail,post_excerpt,more,create_time,excerpt';
|
|
|
$res = $this->getChildArticlePage($position,$field);
|
|
|
foreach($res['data']['data'] as &$value){
|
|
|
$more = json_decode($value['more'],true);
|
|
|
$value['audio'] = isset($more['audio']) && !empty($more['audio'])?$more['audio']:'';
|
|
|
$contentModel = new PortalPostModel();
|
|
|
$value['excerpt'] = $contentModel->getPostContentAttr($value['excerpt']);
|
|
|
}
|
|
|
$this->assign('res',$res['data']);
|
|
|
$this->assign('page',$res['page']);
|
...
|
...
|
|