作者 lyh

gx

@@ -141,7 +141,7 @@ class FileController @@ -141,7 +141,7 @@ class FileController
141 $fileModel = new File(); 141 $fileModel = new File();
142 $file_hash = $fileModel->read(['hash'=>$hash]); 142 $file_hash = $fileModel->read(['hash'=>$hash]);
143 if($file_hash !== false){ 143 if($file_hash !== false){
144 - return $hash; 144 + return $this->response('资源',Code::SUCCESS,['file'=>$hash]);
145 } 145 }
146 $url = $this->path; 146 $url = $this->path;
147 $fileName = uniqid().rand(10000,99999).'.'.$files->getClientOriginalExtension(); 147 $fileName = uniqid().rand(10000,99999).'.'.$files->getClientOriginalExtension();