|
...
|
...
|
@@ -25,6 +25,7 @@ use App\Models\Project\ProjectAiSetting; |
|
|
|
use App\Models\ProjectAssociation\ProjectAssociation;
|
|
|
|
use App\Models\RouteMap\RouteMap;
|
|
|
|
use App\Models\Template\BTemplateMain;
|
|
|
|
use App\Models\Template\TemplateTypeMain;
|
|
|
|
use App\Models\Visit\Visit;
|
|
|
|
use App\Models\WebSetting\WebLanguage;
|
|
|
|
use App\Models\WebSetting\WebSetting;
|
|
...
|
...
|
@@ -53,6 +54,10 @@ class lyhDemo extends Command |
|
|
|
protected $description = '更新路由';
|
|
|
|
|
|
|
|
public function handle(){
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function _actionTemplateMain(){
|
|
|
|
$data = [];
|
|
|
|
$projectModel = new Project();
|
|
|
|
$lists = $projectModel->list(['delete_status' => 0,'project_type'=>0,'extend_type'=>0,'type'=>['in',[2,3,4,6]]], 'id', ['id']);
|
|
...
|
...
|
@@ -64,6 +69,12 @@ class lyhDemo extends Command |
|
|
|
$categoryModel = new Category();
|
|
|
|
$count = $categoryModel->counts(['id'=>['>',0]]);
|
|
|
|
if(($info === false) && ($count > 0)){
|
|
|
|
$mainModel = new TemplateTypeMain();
|
|
|
|
$mainInfo = $mainModel->read(['type'=>2,'is_list'=>1,'is_custom'=>0]);
|
|
|
|
$main_html = $mainInfo['main_html'];
|
|
|
|
$main_css = "<style id='globalsojs-styles'></style>";
|
|
|
|
//写入一条初始数据
|
|
|
|
$bTemplateMainModel->addReturnId(['type'=>2,'is_list'=>1,'is_custom'=>0,'project_id'=>$val['id'],'main_html'=>$main_html,'main_css'=>$main_css]);
|
|
|
|
$data[] = $val['id'];
|
|
|
|
}
|
|
|
|
DB::disconnect('custom_mysql');
|
...
|
...
|
|