Index.php 550 B

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