|
@@ -24,6 +24,7 @@ use App\Models\Product\Keyword; |
|
@@ -24,6 +24,7 @@ use App\Models\Product\Keyword; |
|
24
|
use App\Models\Product\Product;
|
24
|
use App\Models\Product\Product;
|
|
25
|
use App\Models\Project\DeployOptimize;
|
25
|
use App\Models\Project\DeployOptimize;
|
|
26
|
use App\Models\Project\MinorLanguages;
|
26
|
use App\Models\Project\MinorLanguages;
|
|
|
|
27
|
+use App\Models\Project\PageSetting;
|
|
27
|
use App\Models\Project\Project;
|
28
|
use App\Models\Project\Project;
|
|
28
|
use App\Models\Purchaser\PurchaserInfo;
|
29
|
use App\Models\Purchaser\PurchaserInfo;
|
|
29
|
use App\Models\RouteMap\RouteMap;
|
30
|
use App\Models\RouteMap\RouteMap;
|
|
@@ -52,7 +53,103 @@ class Demo extends Command |
|
@@ -52,7 +53,103 @@ class Demo extends Command |
|
52
|
protected $description = 'demo';
|
53
|
protected $description = 'demo';
|
|
53
|
|
54
|
|
|
54
|
public function handle(){
|
55
|
public function handle(){
|
|
55
|
-
|
56
|
+ $pageSettingModel = new PageSetting();
|
|
|
|
57
|
+ $pageList = $pageSettingModel->list();
|
|
|
|
58
|
+ foreach ($pageList as $v){
|
|
|
|
59
|
+ ProjectServer::useProject($v['project_id']);
|
|
|
|
60
|
+ if($v['product_list'] == 1){
|
|
|
|
61
|
+ $param = [
|
|
|
|
62
|
+ 'name'=>'产品列表',
|
|
|
|
63
|
+ 'source'=>2,
|
|
|
|
64
|
+ 'is_list'=>1,
|
|
|
|
65
|
+ 'is_custom'=>0,
|
|
|
|
66
|
+ 'header_status'=>1,
|
|
|
|
67
|
+ 'footer_status'=>1,
|
|
|
|
68
|
+ 'created_at'=>date('Y-m-d H:i:s'),
|
|
|
|
69
|
+ 'updated_at'=>date('Y-m-d H:i:s'),
|
|
|
|
70
|
+ ];
|
|
|
|
71
|
+ DB::connection('custom_mysql')->table('gl_project_com_config')->insert($param);
|
|
|
|
72
|
+ }
|
|
|
|
73
|
+ if($v['product_details'] == 1){
|
|
|
|
74
|
+ $param = [
|
|
|
|
75
|
+ 'name'=>'产品详情',
|
|
|
|
76
|
+ 'source'=>2,
|
|
|
|
77
|
+ 'is_list'=>0,
|
|
|
|
78
|
+ 'is_custom'=>0,
|
|
|
|
79
|
+ 'header_status'=>1,
|
|
|
|
80
|
+ 'footer_status'=>1,
|
|
|
|
81
|
+ 'created_at'=>date('Y-m-d H:i:s'),
|
|
|
|
82
|
+ 'updated_at'=>date('Y-m-d H:i:s'),
|
|
|
|
83
|
+ ];
|
|
|
|
84
|
+ DB::connection('custom_mysql')->table('gl_project_com_config')->insert($param);
|
|
|
|
85
|
+ }
|
|
|
|
86
|
+ if($v['page_list'] == 1){
|
|
|
|
87
|
+ $param = [
|
|
|
|
88
|
+ 'name'=>'单页面',
|
|
|
|
89
|
+ 'source'=>9,
|
|
|
|
90
|
+ 'is_list'=>0,
|
|
|
|
91
|
+ 'is_custom'=>0,
|
|
|
|
92
|
+ 'header_status'=>1,
|
|
|
|
93
|
+ 'footer_status'=>1,
|
|
|
|
94
|
+ 'created_at'=>date('Y-m-d H:i:s'),
|
|
|
|
95
|
+ 'updated_at'=>date('Y-m-d H:i:s'),
|
|
|
|
96
|
+ ];
|
|
|
|
97
|
+ DB::connection('custom_mysql')->table('gl_project_com_config')->insert($param);
|
|
|
|
98
|
+ }
|
|
|
|
99
|
+ if($v['blog_list'] == 1){
|
|
|
|
100
|
+ $param = [
|
|
|
|
101
|
+ 'name'=>'博客列表',
|
|
|
|
102
|
+ 'source'=>3,
|
|
|
|
103
|
+ 'is_list'=>1,
|
|
|
|
104
|
+ 'is_custom'=>0,
|
|
|
|
105
|
+ 'header_status'=>1,
|
|
|
|
106
|
+ 'footer_status'=>1,
|
|
|
|
107
|
+ 'created_at'=>date('Y-m-d H:i:s'),
|
|
|
|
108
|
+ 'updated_at'=>date('Y-m-d H:i:s'),
|
|
|
|
109
|
+ ];
|
|
|
|
110
|
+ DB::connection('custom_mysql')->table('gl_project_com_config')->insert($param);
|
|
|
|
111
|
+ }
|
|
|
|
112
|
+ if($v['blog_details'] == 1){
|
|
|
|
113
|
+ $param = [
|
|
|
|
114
|
+ 'name'=>'博客详情',
|
|
|
|
115
|
+ 'source'=>3,
|
|
|
|
116
|
+ 'is_list'=>0,
|
|
|
|
117
|
+ 'is_custom'=>0,
|
|
|
|
118
|
+ 'header_status'=>1,
|
|
|
|
119
|
+ 'footer_status'=>1,
|
|
|
|
120
|
+ 'created_at'=>date('Y-m-d H:i:s'),
|
|
|
|
121
|
+ 'updated_at'=>date('Y-m-d H:i:s'),
|
|
|
|
122
|
+ ];
|
|
|
|
123
|
+ DB::connection('custom_mysql')->table('gl_project_com_config')->insert($param);
|
|
|
|
124
|
+ }
|
|
|
|
125
|
+ if($v['news_list'] == 1){
|
|
|
|
126
|
+ $param = [
|
|
|
|
127
|
+ 'name'=>'新闻列表',
|
|
|
|
128
|
+ 'source'=>4,
|
|
|
|
129
|
+ 'is_list'=>1,
|
|
|
|
130
|
+ 'is_custom'=>0,
|
|
|
|
131
|
+ 'header_status'=>1,
|
|
|
|
132
|
+ 'footer_status'=>1,
|
|
|
|
133
|
+ 'created_at'=>date('Y-m-d H:i:s'),
|
|
|
|
134
|
+ 'updated_at'=>date('Y-m-d H:i:s'),
|
|
|
|
135
|
+ ];
|
|
|
|
136
|
+ DB::connection('custom_mysql')->table('gl_project_com_config')->insert($param);
|
|
|
|
137
|
+ }
|
|
|
|
138
|
+ if($v['news_details'] == 1){
|
|
|
|
139
|
+ $param = [
|
|
|
|
140
|
+ 'name'=>'新闻详情',
|
|
|
|
141
|
+ 'source'=>4,
|
|
|
|
142
|
+ 'is_list'=>0,
|
|
|
|
143
|
+ 'is_custom'=>0,
|
|
|
|
144
|
+ 'header_status'=>1,
|
|
|
|
145
|
+ 'footer_status'=>1,
|
|
|
|
146
|
+ 'created_at'=>date('Y-m-d H:i:s'),
|
|
|
|
147
|
+ 'updated_at'=>date('Y-m-d H:i:s'),
|
|
|
|
148
|
+ ];
|
|
|
|
149
|
+ DB::connection('custom_mysql')->table('gl_project_com_config')->insert($param);
|
|
|
|
150
|
+ }
|
|
|
|
151
|
+ DB::disconnect('custom_mysql');
|
|
|
|
152
|
+ }
|
|
56
|
}
|
153
|
}
|
|
57
|
|
154
|
|
|
58
|
public function synchronizationFile($path_name){
|
155
|
public function synchronizationFile($path_name){
|