| 12345678910111213141516171819202122232425262728293031323334 | 
							- <?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', array('output_app' => [], '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);
 
-     }
 
- }
 
 
  |