Authored by 张丽霞

Merge branch 'feature/branchOptmztn' of git.dev.yoho.cn:web/yohobuywap into feature/branchOptmztn

... ... @@ -88,4 +88,16 @@ class IndexData
return Yohobuy::get(Yohobuy::SERVICE_URL . 'operations/api/v5/entrance/getEntrance', $param);
}
/**
* 获取公告信息
* @author sefon 2016-5-10 16:11:46
*/
public static function getNotice()
{
$param = Yohobuy::param();
$param['method'] = 'app.resources.getNotices';
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(Yohobuy::API_URL, $param);
}
}
... ...
... ... @@ -2,6 +2,7 @@
use Action\AbstractAction;
use Plugin\Helpers;
use LibModels\Wap\Home\IndexData;
/**
* 频道选择
... ... @@ -46,4 +47,25 @@ class IndexController extends AbstractAction
$this->_view->display('systemUpdate');
}
/**
* 公告
*/
public function noticeAction()
{
if (!$this->isAjax()) {
exit;
}
$notice = array();
$data = IndexData::getNotice();
do {
if ($data['code'] != 200 || !isset($data['open']) || $data['open'] != 'Y' || !isset($data['open']) || empty($data['list'])) {
break;
}
foreach ($data['list'] as $key => $val) {
}
} while(false);
$this->echoJson($notice);
}
}
... ...