Authored by tmq

添加最新资讯

... ... @@ -661,15 +661,15 @@ define('yohood', function(require, exports) {
hotVideo += template(tools.limitWords(v.title, 52), common.getImages(v.thumb, '0230x0230', 'blogimg', '1'),
'/news/detail/id/' + v.id, 2, isTitleStyle, v.title, '');
});
//最新视频
$.each(data.data.lastVideo, function(i, v) {
//最新资讯
$.each(data.data.lastNews, function(i, v) {
isTitleStyle = (v.main_title_type == 1) ? 1 : 0;
lastVideo += template(tools.limitWords(v.title, 52), common.getImages(v.thumb, '0230x0230', 'blogimg', '1'),
lastNews += template(tools.limitWords(v.title, 52), common.getImages(v.thumb, '0230x0230', 'blogimg', '1'),
'/news/detail/id/' + v.id, 2, isTitleStyle, v.title, '');
});
$(".post-list").html(recom);
$(".side-related-list").eq(0).html(hotVideo);
$(".side-related-list").eq(1).html(lastVideo);
$(".side-related-list").eq(1).html(lastNews);
if ($('.detail-body').outerHeight() > $('.detail-side').outerHeight() && navigator.userAgent.indexOf('iPad') === -1) {
//右侧相关文章定位
... ...
... ... @@ -238,7 +238,7 @@ EOT;
public function getdetailnewsAction()
{
$id = intval($this->_request->id);
$list = array('recom'=> array(), 'hotVideo'=> array(), 'lastVideo' => array());
$list = array('recom'=> array(), 'hotVideo'=> array(), 'lastNews' => array());
$tag = '视频';
$exceptTags = array('手机视频');
$recom = array();
... ... @@ -251,10 +251,10 @@ EOT;
}
$recom = array_slice(array_filter($recom + $temp2), 0, 3);
$hotVideo = array_values(Facade_News::getListByDateHits($tag, 0, 5, $exceptTags));
$lastVideo = array_values(Facade_News::getLatestNews($tag, 0, 5, $exceptTags));
$lastNews = array_values(Facade_News::getLatestNews('', 0, 5, $exceptTags));
$list['recom'] = $recom;
$list['hotVideo'] = $hotVideo;
$list['lastVideo'] = $lastVideo;
$list['lastVideo'] = $lastNews;
foreach($list as $key => $listnews)
{
if(!empty($listnews))
... ...
... ... @@ -138,7 +138,7 @@
<div class="side-related-post">
<div class="side-related-tab clearfix">
<a class="current" href="javascript:;">最热视频</a>
<a href="javascript:;">最新宣传片</a>
<a href="javascript:;">最新资讯</a>
</div>
<div class="side-related-wrap">
<div class="side-related-list main-layout current">
... ...