id = Dever::input('id', 'is_numeric', '上传规则错误', 1); $this->file = Dever::input('file', '!empty', '上传文件错误'); $this->cate_id = Dever::input('cate_id', 'is_numeric', '上传分类', 1); $this->group_id = Dever::load('util', 'upload')->getGroup(); $this->user_id = Dever::load('util', 'upload')->getUser(); } public function act() { return Dever::load('save', 'upload')->init($this->id, $this->cate_id, $this->group_id, $this->user_id)->act($this->file); } public function wangEditor() { Dever::config('setting', array('output' => array ( 'status' => array('errno', array('1' => 0, '2' => 1)), 'msg' => 'message', ))); return $this->act(); } public function avatar() { $uid = Dever::input('uid', 'is_numeric', '用户ID'); return Dever::load('save', 'upload')->init($this->id, $this->cate_id, $this->group_id, $this->user_id)->act($this->file, 'jpg', $uid); } }