作者 张关杰

Merge branch 'develop' of http://47.244.231.31:8099/zhl/globalso-v6 into develop

@@ -82,7 +82,9 @@ class FileController @@ -82,7 +82,9 @@ class FileController
82 } 82 }
83 $size = $info['size']; 83 $size = $info['size'];
84 // 设置Content-Type头部 84 // 设置Content-Type头部
85 - $header['Content-Type'] = 'video/' . $info['type']; 85 + if($info['type'] == 'mp4'){
  86 + $header['Content-Type'] = 'video/' . $info['type'];
  87 + }
86 // 设置Accept-Ranges头部 88 // 设置Accept-Ranges头部
87 $header['Accept-Ranges'] = 'bytes'; 89 $header['Accept-Ranges'] = 'bytes';
88 // 检查是否有范围请求 90 // 检查是否有范围请求
@@ -285,9 +287,9 @@ class FileController @@ -285,9 +287,9 @@ class FileController
285 * @method :post 287 * @method :post
286 * @time :2023/6/26 16:28 288 * @time :2023/6/26 16:28
287 */ 289 */
288 - public function downLoad($hash){ 290 + public function downLoad(){
289 $file_model = new File(); 291 $file_model = new File();
290 - $info = $file_model->read(['hash' => $hash]); 292 + $info = $file_model->read(['hash' => $this->param['hash']]);
291 if ($info === false) { 293 if ($info === false) {
292 $this->response('指定文件不存在!', Code::USER_ERROR); 294 $this->response('指定文件不存在!', Code::USER_ERROR);
293 } 295 }
@@ -221,6 +221,7 @@ Route::middleware(['bloginauth'])->group(function () { @@ -221,6 +221,7 @@ Route::middleware(['bloginauth'])->group(function () {
221 Route::prefix('files')->group(function () { 221 Route::prefix('files')->group(function () {
222 Route::post('/upload', [\App\Http\Controllers\File\FileController::class, 'upload'])->name('files_upload'); 222 Route::post('/upload', [\App\Http\Controllers\File\FileController::class, 'upload'])->name('files_upload');
223 Route::any('/getFileList', [\App\Http\Controllers\File\FileController::class, 'getFileList'])->name('files_getFileList'); 223 Route::any('/getFileList', [\App\Http\Controllers\File\FileController::class, 'getFileList'])->name('files_getFileList');
  224 + Route::any('/downLoad', [\App\Http\Controllers\File\FileController::class, 'downLoad'])->name('files_downLoad');
224 }); 225 });
225 //精准询盘 226 //精准询盘
226 Route::prefix('inquiry')->group(function () { 227 Route::prefix('inquiry')->group(function () {