Authored by xiaowei

我的逛

... ... @@ -332,15 +332,21 @@ class HomeController extends AbstractAction
$gender = Helpers::getGenderByCookie();
$yh_channel = Helpers::getChannelByCookie();
$guangInfo = \home\GuangModel::getMyGuang($uid, $page, $yh_channel, $gender, $limit);
$totalPage = $guangInfo['totalPage'];
unset($guangInfo['totalPage']);
if ($page == 1)
{
$this->setTitle('我收藏的');
$this->setNavHeader('我收藏的', true, '');
$this->_view->display('my-guang', array('myGuangPage' => true, 'myGuang' => array('infos' => $guangInfo), 'pageFooter' => true));
}
else
else if ($page > 1 && $page<=$totalPage)
{
$this->_view->display('my-guang-partial', array('infos' => $guangInfo));
}
else if ($page > 1 && $page>$totalPage)
{
$this->_view->display('my-guang-partial', array('infos' => $guangInfo));
echo '';//退出循环
}
}
... ...
... ... @@ -18,6 +18,7 @@ class GuangModel
$result = array();
//调用接口获取数据
$res = GuangData::getGuangInfo($uid, $page, $yh_channel, $gender, $limit);
$result['totalPage']=intval($res['data']['totalPage']);
if (!empty($res['data']['data']))
{
foreach ($res['data']['data'] as $k => $v)
... ...