| 123456789101112131415161718192021222324252627282930313233343536 | 
							- <?php
 
- namespace app\common\controller;
 
- use app\BaseController;
 
- use app\common\middleware\Auth;
 
- use app\admin\model\Notice as NoticeModel;
 
- /**
 
-  * Description of Notice
 
-  *
 
-  * @author sgq
 
-  */
 
- class Notice extends BaseController {
 
-     protected $middleware = [Auth::class];
 
-     /**
 
-      * 通知列表
 
-      * @return type
 
-      */
 
-     public function index() {
 
-         $total = NoticeModel::count();
 
-         return view("", ["total" => $total]);
 
-     }
 
-     public function list() {
 
-         if ($this->request->isAjax()) {
 
-             $pageSize = $this->request->param("pageSize") ?: 6;
 
-             $page = $this->request->param("page") ?: 1;
 
-             $list = NoticeModel::order(["isTop", "topTime" => "desc", "createTime" => "desc"])->page($page, $pageSize)->select();
 
-             return json($list);
 
-         }
 
-     }
 
- }
 
 
  |