作者 lyh

gx

@@ -55,22 +55,18 @@ class ImageController extends Controller @@ -55,22 +55,18 @@ class ImageController extends Controller
55 return response(['code'=>Code::USER_LOGIN_ERROE,'msg'=>'当前用户未登录']); 55 return response(['code'=>Code::USER_LOGIN_ERROE,'msg'=>'当前用户未登录']);
56 } 56 }
57 $this->param = $this->request->all(); 57 $this->param = $this->request->all();
58 - $this->config = config('filesystems.disks.upload');  
59 - $this->uploads = config('upload.default_image');  
60 - //上传路径设置  
61 - var_dump($this->param['image_type']); 58 + var_dump($this->param);
  59 + die();
62 if(!isset($this->param['image_type'])){ 60 if(!isset($this->param['image_type'])){
63 - return response(['code'=>Code::USER_LOGIN_ERROE,'msg'=>'当前用户未登录']); 61 + return response(['msg'=>'参数错误']);
64 } 62 }
65 - var_dump(22222); 63 + $this->config = config('filesystems.disks.upload');
  64 + $this->uploads = config('upload.default_image');
66 if(isset($this->param['refer_type']) && $this->param['refer_type'] == 1){ 65 if(isset($this->param['refer_type']) && $this->param['refer_type'] == 1){
67 $this->path = $this->uploads['path_a'].'/'.$this->image_type[$this->param['image_type']].'/'.date('Y-m'); 66 $this->path = $this->uploads['path_a'].'/'.$this->image_type[$this->param['image_type']].'/'.date('Y-m');
68 }else{ 67 }else{
69 $this->path = $this->uploads['path_b'].'/'.$this->cache['project_id'].'/'.$this->image_type[$this->param['image_type']].'/'.date('Y-m'); 68 $this->path = $this->uploads['path_b'].'/'.$this->cache['project_id'].'/'.$this->image_type[$this->param['image_type']].'/'.date('Y-m');
70 } 69 }
71 - var_dump(3333);  
72 - var_dump($this->path);  
73 - die();  
74 } 70 }
75 71
76 /** 72 /**