Index.php 482 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. namespace app\index\controller;
  3. use app\common\controller\Frontend;
  4. class Index extends Frontend
  5. {
  6. protected $layout = '';
  7. public function _initialize()
  8. {
  9. parent::_initialize();
  10. }
  11. public function index()
  12. {
  13. return $this->view->fetch();
  14. }
  15. public function news()
  16. {
  17. $newslist = [];
  18. return jsonp(['newslist' => $newslist, 'new' => count($newslist), 'url' => 'http://www.fastadmin.net?ref=news']);
  19. }
  20. }