|
@@ -25,6 +25,7 @@ use App\Models\Project\ProjectAiSetting; |
|
@@ -25,6 +25,7 @@ use App\Models\Project\ProjectAiSetting; |
|
25
|
use App\Models\ProjectAssociation\ProjectAssociation;
|
25
|
use App\Models\ProjectAssociation\ProjectAssociation;
|
|
26
|
use App\Models\RouteMap\RouteMap;
|
26
|
use App\Models\RouteMap\RouteMap;
|
|
27
|
use App\Models\Template\BTemplateMain;
|
27
|
use App\Models\Template\BTemplateMain;
|
|
|
|
28
|
+use App\Models\Template\TemplateTypeMain;
|
|
28
|
use App\Models\Visit\Visit;
|
29
|
use App\Models\Visit\Visit;
|
|
29
|
use App\Models\WebSetting\WebLanguage;
|
30
|
use App\Models\WebSetting\WebLanguage;
|
|
30
|
use App\Models\WebSetting\WebSetting;
|
31
|
use App\Models\WebSetting\WebSetting;
|
|
@@ -53,6 +54,10 @@ class lyhDemo extends Command |
|
@@ -53,6 +54,10 @@ class lyhDemo extends Command |
|
53
|
protected $description = '更新路由';
|
54
|
protected $description = '更新路由';
|
|
54
|
|
55
|
|
|
55
|
public function handle(){
|
56
|
public function handle(){
|
|
|
|
57
|
+ return true;
|
|
|
|
58
|
+ }
|
|
|
|
59
|
+
|
|
|
|
60
|
+ public function _actionTemplateMain(){
|
|
56
|
$data = [];
|
61
|
$data = [];
|
|
57
|
$projectModel = new Project();
|
62
|
$projectModel = new Project();
|
|
58
|
$lists = $projectModel->list(['delete_status' => 0,'project_type'=>0,'extend_type'=>0,'type'=>['in',[2,3,4,6]]], 'id', ['id']);
|
63
|
$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 |
|
@@ -64,6 +69,12 @@ class lyhDemo extends Command |
|
64
|
$categoryModel = new Category();
|
69
|
$categoryModel = new Category();
|
|
65
|
$count = $categoryModel->counts(['id'=>['>',0]]);
|
70
|
$count = $categoryModel->counts(['id'=>['>',0]]);
|
|
66
|
if(($info === false) && ($count > 0)){
|
71
|
if(($info === false) && ($count > 0)){
|
|
|
|
72
|
+ $mainModel = new TemplateTypeMain();
|
|
|
|
73
|
+ $mainInfo = $mainModel->read(['type'=>2,'is_list'=>1,'is_custom'=>0]);
|
|
|
|
74
|
+ $main_html = $mainInfo['main_html'];
|
|
|
|
75
|
+ $main_css = "<style id='globalsojs-styles'></style>";
|
|
|
|
76
|
+ //写入一条初始数据
|
|
|
|
77
|
+ $bTemplateMainModel->addReturnId(['type'=>2,'is_list'=>1,'is_custom'=>0,'project_id'=>$val['id'],'main_html'=>$main_html,'main_css'=>$main_css]);
|
|
67
|
$data[] = $val['id'];
|
78
|
$data[] = $val['id'];
|
|
68
|
}
|
79
|
}
|
|
69
|
DB::disconnect('custom_mysql');
|
80
|
DB::disconnect('custom_mysql');
|