|
...
|
...
|
@@ -18,6 +18,7 @@ use App\Models\Product\Keyword; |
|
|
|
use App\Models\Product\Product;
|
|
|
|
use App\Models\Project\Project;
|
|
|
|
use App\Models\RouteMap\RouteMap;
|
|
|
|
use App\Models\Template\BTemplate;
|
|
|
|
use App\Models\Template\BTemplateMain;
|
|
|
|
use App\Services\ProjectServer;
|
|
|
|
use Illuminate\Console\Command;
|
|
...
|
...
|
@@ -73,9 +74,29 @@ class UpdateMainHtml extends Command |
|
|
|
* @time :2023/12/27 18:03
|
|
|
|
*/
|
|
|
|
public function editMainHtml(){
|
|
|
|
$templateModel = new BTemplate();
|
|
|
|
$info = $templateModel->read(['source'=>2,'source_id'=>0]);
|
|
|
|
if($info !== false){
|
|
|
|
$mainModel = new BTemplateMain();
|
|
|
|
// $mainModel->edit(['type'=>3],['type'=>4]);
|
|
|
|
$mainModel->edit(['type'=>4],['type'=>6]);
|
|
|
|
$mainInfo = $mainModel->read(['type'=>2,'is_list'=>1]);
|
|
|
|
if($mainInfo === false){
|
|
|
|
$data = [
|
|
|
|
'type'=>2,
|
|
|
|
'is_list'=>1,
|
|
|
|
'main_html'=>$info['main_html'],
|
|
|
|
'main_css'=>$info['main_css'],
|
|
|
|
'section_list_id'=>$info['section_list_id']
|
|
|
|
];
|
|
|
|
$mainModel->add($data);
|
|
|
|
}else{
|
|
|
|
$data = [
|
|
|
|
'main_html'=>$info['main_html'],
|
|
|
|
'main_css'=>$info['main_css'],
|
|
|
|
'section_list_id'=>$info['section_list_id']
|
|
|
|
];
|
|
|
|
$mainModel->edit($data,['id'=>$mainInfo['id']]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|