|
|
<?php
|
|
|
|
|
|
use Action\AbstractAction;
|
|
|
use Guang\IndexModel;
|
|
|
use LibModels\Wap\Guang\ListData;
|
|
|
use Plugin\Helpers;
|
|
|
use Plugin\Cache;
|
...
|
...
|
@@ -42,7 +43,7 @@ class IndexController extends AbstractAction |
|
|
// $this->setNavSide();
|
|
|
// }
|
|
|
|
|
|
$this->_view->display('index', Guang\IndexModel::getArticle($gender, $type, $uid, $udid));
|
|
|
$this->_view->display('index', IndexModel::getArticle($gender, $type, $uid, $udid));
|
|
|
}
|
|
|
|
|
|
/**
|
...
|
...
|
@@ -91,7 +92,7 @@ class IndexController extends AbstractAction |
|
|
|
|
|
// 标签聚合内容列表
|
|
|
//$article = ListData::article($gender, 0, $uid, $udid, 1, $tag);
|
|
|
$article = Guang\IndexModel::getArticleByTagOrEditor($gender, 0, $uid, $udid, 1, $tag);
|
|
|
$article = IndexModel::getArticleByTagOrEditor($gender, 0, $uid, $udid, 1, $tag);
|
|
|
// 标签聚合内容不存在, 跳到错误页面
|
|
|
if (empty($article['data']['list']['artList'])) {
|
|
|
$this->error();
|
...
|
...
|
@@ -184,7 +185,7 @@ class IndexController extends AbstractAction |
|
|
|
|
|
// 标签聚合内容列表
|
|
|
//$article = ListData::article($gender, 0, $uid, $udid, 1, null, $id);
|
|
|
$article = Guang\IndexModel::getArticleByTagOrEditor($gender, 0, $uid, $udid, 1, null, $id);
|
|
|
$article = IndexModel::getArticleByTagOrEditor($gender, 0, $uid, $udid, 1, null, $id);
|
|
|
// 构建资讯文章内容
|
|
|
if (!empty($article['data']['list']['artList'])) {
|
|
|
$build = array();
|
...
|
...
|
@@ -227,6 +228,7 @@ class IndexController extends AbstractAction |
|
|
$gender = $this->get('gender');
|
|
|
$authorId = $this->get('authorId');
|
|
|
$isApp = $this->get('isApp', false);
|
|
|
$isTab = $this->get('isTab', false); // 是否为tab切换操作
|
|
|
$showAuthor = true;
|
|
|
if (!empty($sortId) && !is_numeric($sortId)) {
|
|
|
break;
|
...
|
...
|
@@ -247,18 +249,7 @@ class IndexController extends AbstractAction |
|
|
$udid = $this->getUdid();
|
|
|
}
|
|
|
//$page = intval($page) + 1;
|
|
|
$article = ListData::article($gender, $sortId, $uid, $udid, $page, $tag, $authorId);
|
|
|
if (empty($article['data']['list']['artList'])) {
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
/* 构建资讯文章内容 */
|
|
|
$data = array();
|
|
|
$build = array();
|
|
|
foreach ($article['data']['list']['artList'] as $article) {
|
|
|
$build[] = Helpers::formatArticle($article, true, $isApp, $showAuthor, $uid);
|
|
|
}
|
|
|
$data['infos'] = $build;
|
|
|
$data = IndexModel::getPageData($gender, $sortId, $uid, $udid, $page, $tag, $authorId, $isApp, $showAuthor, $isTab);
|
|
|
} while (false);
|
|
|
|
|
|
if (isset($data)) {
|
...
|
...
|
|