adminInfo = get_login_admin(); $this->category_id=165; $this->url=[ '/admin/nk.feedback/index?category_id='.$this->category_id, '/admin/nk.feedback/add', '/admin/nk.feedback/edit', '/admin/nk.feedback/del', '/admin/nk.feedback/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); // 获取用户信息 $this->users = Db::table('fa_szxc_information_usermsg')->where('status',1)->field('user_id,name')->select(); View::assign('users', $this->users); $street = Db::table('fa_geo_area')->where(['switch' => 1, 'city_code' => '510500']) ->field('area_id id,area_code code,area_name name') ->select(); View::assign('street', $street); 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); } }