正在显示
6 个修改的文件
包含
16 行增加
和
16 行删除
| @@ -435,9 +435,9 @@ if (!function_exists('getImageUrl')) { | @@ -435,9 +435,9 @@ if (!function_exists('getImageUrl')) { | ||
| 435 | if($info['is_cos'] == 1){ | 435 | if($info['is_cos'] == 1){ |
| 436 | $cos = config('filesystems.disks.cos'); | 436 | $cos = config('filesystems.disks.cos'); |
| 437 | $cosCdn = $cos['cdn']; | 437 | $cosCdn = $cos['cdn']; |
| 438 | - $url = $cosCdn.'/upload'.$info['path']; | 438 | + $url = $cosCdn.$info['path']; |
| 439 | }else{ | 439 | }else{ |
| 440 | - $url = url('upload'.$info['path']); | 440 | + $url = url($info['path']); |
| 441 | } | 441 | } |
| 442 | }else{ | 442 | }else{ |
| 443 | $url = $hash; | 443 | $url = $hash; |
| @@ -261,11 +261,11 @@ class LoginController extends BaseController | @@ -261,11 +261,11 @@ class LoginController extends BaseController | ||
| 261 | }else{ | 261 | }else{ |
| 262 | $data = [ | 262 | $data = [ |
| 263 | 'code'=>0, | 263 | 'code'=>0, |
| 264 | - 'message'=>'关注成功,请登录后绑定账号后扫码', | 264 | + 'message'=>'关注成功,请登录后绑定账号后扫码,如已绑定,请再次扫码', |
| 265 | ]; | 265 | ]; |
| 266 | } | 266 | } |
| 267 | return $data; | 267 | return $data; |
| 268 | } | 268 | } |
| 269 | - | 269 | + |
| 270 | 270 | ||
| 271 | } | 271 | } |
| @@ -222,7 +222,7 @@ class FileController | @@ -222,7 +222,7 @@ class FileController | ||
| 222 | */ | 222 | */ |
| 223 | public function downLoad(){ | 223 | public function downLoad(){ |
| 224 | $file_model = new File(); | 224 | $file_model = new File(); |
| 225 | - $info = $file_model->read(['hash' => $this->param['hash']]); | 225 | + $info = $file_model->read(['path' => $this->param['path']]); |
| 226 | if ($info === false) { | 226 | if ($info === false) { |
| 227 | $this->response('指定文件不存在!', Code::USER_ERROR); | 227 | $this->response('指定文件不存在!', Code::USER_ERROR); |
| 228 | } | 228 | } |
| @@ -314,11 +314,11 @@ class FileController | @@ -314,11 +314,11 @@ class FileController | ||
| 314 | */ | 314 | */ |
| 315 | public function getDownloadUrl(){ | 315 | public function getDownloadUrl(){ |
| 316 | $fileModel = new File(); | 316 | $fileModel = new File(); |
| 317 | - $info = $fileModel->read(['hash' => $this->param['hash']]); | 317 | + $info = $fileModel->read(['path' => $this->param['path']]); |
| 318 | if ($info === false) { | 318 | if ($info === false) { |
| 319 | $this->response('指定文件不存在!', Code::USER_ERROR); | 319 | $this->response('指定文件不存在!', Code::USER_ERROR); |
| 320 | } | 320 | } |
| 321 | - $data = ['file_download'=>url('a/downLoad/files?hash='.$this->param['hash'])]; | 321 | + $data = ['file_download'=>url('a/downLoad/files?path='.$this->param['path'])]; |
| 322 | $this->response('success',Code::SUCCESS,$data); | 322 | $this->response('success',Code::SUCCESS,$data); |
| 323 | } | 323 | } |
| 324 | } | 324 | } |
| @@ -16,7 +16,7 @@ use Intervention\Image\Facades\Image; | @@ -16,7 +16,7 @@ use Intervention\Image\Facades\Image; | ||
| 16 | 16 | ||
| 17 | class ImageController extends Controller | 17 | class ImageController extends Controller |
| 18 | { | 18 | { |
| 19 | - public $path = '';//路径 | 19 | + public $path = '/upload';//路径 |
| 20 | 20 | ||
| 21 | public $config = '';//存储默认配置 | 21 | public $config = '';//存储默认配置 |
| 22 | 22 | ||
| @@ -291,7 +291,7 @@ class ImageController extends Controller | @@ -291,7 +291,7 @@ class ImageController extends Controller | ||
| 291 | */ | 291 | */ |
| 292 | public function download(){ | 292 | public function download(){ |
| 293 | $imageModel = new ImageModel(); | 293 | $imageModel = new ImageModel(); |
| 294 | - $info = $imageModel->read(['hash' => $this->param['hash']]); | 294 | + $info = $imageModel->read(['path' => $this->param['path']]); |
| 295 | if ($info === false) { | 295 | if ($info === false) { |
| 296 | $this->response('指定文件不存在!', Code::USER_ERROR); | 296 | $this->response('指定文件不存在!', Code::USER_ERROR); |
| 297 | } | 297 | } |
| @@ -404,11 +404,11 @@ class ImageController extends Controller | @@ -404,11 +404,11 @@ class ImageController extends Controller | ||
| 404 | */ | 404 | */ |
| 405 | public function getDownloadUrl(){ | 405 | public function getDownloadUrl(){ |
| 406 | $imageModel = new ImageModel(); | 406 | $imageModel = new ImageModel(); |
| 407 | - $info = $imageModel->read(['hash' => $this->param['hash']]); | 407 | + $info = $imageModel->read(['path' => $this->param['path']]); |
| 408 | if ($info === false) { | 408 | if ($info === false) { |
| 409 | $this->response('指定文件不存在!', Code::USER_ERROR); | 409 | $this->response('指定文件不存在!', Code::USER_ERROR); |
| 410 | } | 410 | } |
| 411 | - $data = ['image_download'=>url('a/downLoad/images?hash='.$this->param['hash'])]; | 411 | + $data = ['image_download'=>url('a/downLoad/images?path='.$this->param['path'])]; |
| 412 | $this->response('success',Code::SUCCESS,$data); | 412 | $this->response('success',Code::SUCCESS,$data); |
| 413 | } | 413 | } |
| 414 | } | 414 | } |
| @@ -30,7 +30,7 @@ class CosService | @@ -30,7 +30,7 @@ class CosService | ||
| 30 | 'secretKey' => $cos['credentials']['secretKey'], | 30 | 'secretKey' => $cos['credentials']['secretKey'], |
| 31 | ], | 31 | ], |
| 32 | ]); | 32 | ]); |
| 33 | - $key = 'upload'.$path.'/'.$filename; | 33 | + $key = $path.'/'.$filename; |
| 34 | $cosClient->putObject([ | 34 | $cosClient->putObject([ |
| 35 | 'Bucket' => $cos['bucket'], | 35 | 'Bucket' => $cos['bucket'], |
| 36 | 'Key' => $key, | 36 | 'Key' => $key, |
| @@ -19,15 +19,15 @@ return [ | @@ -19,15 +19,15 @@ return [ | ||
| 19 | 'size' => [ | 19 | 'size' => [ |
| 20 | 'max' => 1024*1024*2, // 2M | 20 | 'max' => 1024*1024*2, // 2M |
| 21 | ], | 21 | ], |
| 22 | - 'path_b' => '/p', | ||
| 23 | - 'path_a' => '/m', | 22 | + 'path_b' => '/upload/p', |
| 23 | + 'path_a' => '/upload/m', | ||
| 24 | ], | 24 | ], |
| 25 | //默认视频 | 25 | //默认视频 |
| 26 | 'default_file' =>[ | 26 | 'default_file' =>[ |
| 27 | 'size' => [ | 27 | 'size' => [ |
| 28 | 'max' => 1024*1024*20, // 2M | 28 | 'max' => 1024*1024*20, // 2M |
| 29 | ], | 29 | ], |
| 30 | - 'path_b' => '/p', | ||
| 31 | - 'path_a' => '/m', | 30 | + 'path_b' => '/upload/p', |
| 31 | + 'path_a' => '/upload/m', | ||
| 32 | ], | 32 | ], |
| 33 | ]; | 33 | ]; |
-
请 注册 或 登录 后发表评论