adminInfo = get_login_admin(); $this->category_id=316; $this->url=[ '/admin/nk.recruit/index?category_id='.$this->category_id, '/admin/nk.recruit/add', '/admin/nk.recruit/edit', '/admin/nk.recruit/del', '/admin/nk.recruit/read', ]; } /** * 查看 */ public function index() { if (request()->isAjax()) { $params= get_params(); $params['category_id']=$this->category_id; (new Article())->index($params); } return view('nk/article/index',['url'=>$this->url]); } /** * 添加 */ public function add() { if (request()->isAjax()) { $params= get_params(); $params['category_id']=$this->category_id; (new Article())->add($params); }else{ View::assign('editor', get_system_config('other','editor')); View::assign('url', $this->url); return view('nk/article/add'); } } /** * 修改 */ public function edit() { $params= get_params(); (new Article())->edit($params); return view('nk/article/edit',['url'=>$this->url]); } /** * 查看信息 */ public function read() { $params = get_params(); (new Article())->read($params); return view('nk/article/read',['url'=>$this->url]); } /** * 修改 */ public function del() { $params= get_params(); (new Article())->del($params); } }