| 123456789101112131415161718192021222324252627282930313233 | 
							- <?php namespace Upload\Api;
 
- use Dever;
 
- class Save
 
- {
 
-     public function __construct()
 
-     {
 
-         $this->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', ['output_app' => [], 'output' => [
 
-             'status' => ['errno', ['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);
 
-     }
 
- }
 
 
  |