...
|
...
|
@@ -121,12 +121,10 @@ class Controller_News extends Controller_Abstract |
|
|
}
|
|
|
if($this->_platform == 'android' || $this->_platform == 'iphone')
|
|
|
{
|
|
|
$sameID = Facade_Brand::getSameNewsByNewsID($id);
|
|
|
if(!empty($sameID))
|
|
|
{
|
|
|
$news[] = Facade_News::getOneById($sameID);
|
|
|
}
|
|
|
$news = array_slice(array_merge($news, Facade_News::getList(array(), 0, 3, array('视频'))), 0, 3);
|
|
|
$exceptTags = array('视频');
|
|
|
$news[] = Facade_News::getSameNewsById($id, $exceptTags);
|
|
|
$news = array_merge($news, Facade_News::getList(array(), 0, 3, $exceptTags));
|
|
|
$news = array_slice(array_filter($news), 0, 3);
|
|
|
}
|
|
|
$info['title'] = strip_tags($info['title']);
|
|
|
$info['pics'] = array_filter(explode('|', $info['pics']));
|
...
|
...
|
@@ -147,15 +145,12 @@ class Controller_News extends Controller_Abstract |
|
|
{
|
|
|
$id = intval($this->_request->id);
|
|
|
$list = array('recom'=> array(), 'hotVideo'=> array(), 'lastVideo' => array());
|
|
|
$sameID = Facade_Brand::getSameNewsByNewsID($id);
|
|
|
$tag = '视频';
|
|
|
$exceptTags = array('手机视频');
|
|
|
$recom = array();
|
|
|
if(!empty($sameID))
|
|
|
{
|
|
|
$recom[] = Facade_News::getOneById($sameID);
|
|
|
}
|
|
|
$recom = array_slice(array_merge($recom, Facade_News::getList(array(), 0, 3, $exceptTags)), 0, 3);
|
|
|
$recom[] = Facade_News::getSameNewsById($id, $exceptTags);
|
|
|
$recom = array_merge($recom, Facade_News::getList(array(), 0, 3, $exceptTags));
|
|
|
$recom = array_slice(array_filter($recom), 0, 3);
|
|
|
$hotVideo = array_values(Facade_News::getListByHits($tag, 0, 5, $exceptTags));
|
|
|
$lastVideo = array_values(Facade_News::getList($tag, 0, 5, $exceptTags));
|
|
|
$list['recom'] = $recom;
|
...
|
...
|
|