1234567891011121314151617181920212223242526272829 |
- <?php
- namespace app\index\controller;
- use app\common\controller\Frontend;
- class Index extends Frontend
- {
- protected $layout = 'bootstrap';
- public function _initialize()
- {
- parent::_initialize();
- }
- public function index()
- {
- return $this->view->fetch();
- }
- public function news()
- {
- $newslist = \app\common\model\Page::where('category_id', 1)->order('weigh', 'desc')->select();
- return jsonp(['newslist' => $newslist, 'new' => count($newslist), 'url' => 'http://www.fastadmin.net?ref=news']);
- }
- }
|