uid = get_login_admin('id'); //0是财,1是送审,2是公司 $this->unit_type = Db::name("department")->where("id",get_login_admin("unit_name"))->value("type"); } public function index(){ $detail = Db::name("department")->where("id",get_login_admin("unit_name"))->find(); View::assign("detail",$detail); View::assign("unit_type",$this->unit_type); return view(); } public function edit(){ if (request()->isAjax()) { $param = get_params(); $param["update_time"] = time(); Db::name("department")->where("id",get_login_admin("unit_name"))->update($param); return to_assign(0,'操作成功'); // halt($param); } } }