作者 lyh

gx

@@ -10,6 +10,7 @@ @@ -10,6 +10,7 @@
10 namespace App\Console\Commands\Test; 10 namespace App\Console\Commands\Test;
11 11
12 use App\Models\Project\Project; 12 use App\Models\Project\Project;
  13 +use App\Models\Template\BTemplate;
13 use App\Services\ProjectServer; 14 use App\Services\ProjectServer;
14 use Illuminate\Console\Command; 15 use Illuminate\Console\Command;
15 use Illuminate\Support\Facades\DB; 16 use Illuminate\Support\Facades\DB;
@@ -38,13 +39,29 @@ class EditVideoMp4 extends Command @@ -38,13 +39,29 @@ class EditVideoMp4 extends Command
38 foreach ($list as $v){ 39 foreach ($list as $v){
39 echo date('Y-m-d H:i:s') . 'project_id:'.$v['id'] . PHP_EOL; 40 echo date('Y-m-d H:i:s') . 'project_id:'.$v['id'] . PHP_EOL;
40 ProjectServer::useProject($v['id']); 41 ProjectServer::useProject($v['id']);
41 - $this->copyTable(); 42 + $this->getHtml();
42 DB::disconnect('custom_mysql'); 43 DB::disconnect('custom_mysql');
43 } 44 }
44 echo date('Y-m-d H:i:s') . 'end' . PHP_EOL; 45 echo date('Y-m-d H:i:s') . 'end' . PHP_EOL;
45 } 46 }
46 47
47 /** 48 /**
  49 + * @remark :获取需要替换的html
  50 + * @name :getHtml
  51 + * @author :lyh
  52 + * @method :post
  53 + * @time :2024/4/16 10:17
  54 + */
  55 + public function getHtml(){
  56 + $templateModel = new BTemplate();
  57 + $list = $templateModel->list();
  58 + foreach ($list as $k1 => $v1){
  59 + $this->getVideoSrc($v1['main_html']);
  60 + }
  61 + return true;
  62 + }
  63 +
  64 + /**
48 * @remark :获取video的src 65 * @remark :获取video的src
49 * @name :getVideoSrc 66 * @name :getVideoSrc
50 * @author :lyh 67 * @author :lyh
@@ -60,6 +77,7 @@ class EditVideoMp4 extends Command @@ -60,6 +77,7 @@ class EditVideoMp4 extends Command
60 foreach ($srcLinks as $link) { 77 foreach ($srcLinks as $link) {
61 $videoArr[] = $link; 78 $videoArr[] = $link;
62 } 79 }
  80 + dd($videoArr);
63 return $videoArr; 81 return $videoArr;
64 } 82 }
65 83