优化教辅文件没有文件名称时异常问题。

This commit is contained in:
2025-08-22 16:34:09 +08:00
parent 96da83a1ab
commit cd953adcc0

View File

@@ -48,7 +48,7 @@ class Lebo extends Command
private function start() private function start()
{ {
// $savepath = store_path() . '/lebolebo/'; // $savepath = store_path() . '/lebolebo/';
$savepath = 'E:/lebolebo/'; $savepath = 'D:/lebolebo/';
$account = new Account(); $account = new Account();
$account_info = $account->login('13880615958','robo520'); $account_info = $account->login('13880615958','robo520');
if($account_info['code'] == 500){ if($account_info['code'] == 500){
@@ -233,6 +233,9 @@ class Lebo extends Command
} }
$resourceLists = $kk['content']['resourceList']; $resourceLists = $kk['content']['resourceList'];
foreach($resourceLists as $resourceList){ foreach($resourceLists as $resourceList){
if(empty($resourceList['fileName'])){
continue;
}
$file = $jiaofupath . $resourceList['fileName'] ; $file = $jiaofupath . $resourceList['fileName'] ;
if(Str::endsWith($file,['.mp4','.mov'])){ if(Str::endsWith($file,['.mp4','.mov'])){
$dd = $curr->getVideoUrl($resourceList['fileUrl']); $dd = $curr->getVideoUrl($resourceList['fileUrl']);