|
@@ -11,6 +11,7 @@ namespace App\Http\Controllers\Html; |
|
@@ -11,6 +11,7 @@ namespace App\Http\Controllers\Html; |
|
11
|
|
11
|
|
|
12
|
use App\Http\Controllers\Controller;
|
12
|
use App\Http\Controllers\Controller;
|
|
13
|
use App\Models\Com\NoticeLog;
|
13
|
use App\Models\Com\NoticeLog;
|
|
|
|
14
|
+use App\Models\CustomModule\CustomModule;
|
|
14
|
use App\Models\Project\Project;
|
15
|
use App\Models\Project\Project;
|
|
15
|
use App\Models\RouteMap\RouteMap;
|
16
|
use App\Models\RouteMap\RouteMap;
|
|
16
|
use App\Models\Service\Service as ServiceSettingModel;
|
17
|
use App\Models\Service\Service as ServiceSettingModel;
|
|
@@ -53,13 +54,28 @@ class UpdateHtml extends Controller |
|
@@ -53,13 +54,28 @@ class UpdateHtml extends Controller |
|
53
|
* @method :post
|
54
|
* @method :post
|
|
54
|
* @time :2024/2/2 11:03
|
55
|
* @time :2024/2/2 11:03
|
|
55
|
*/
|
56
|
*/
|
|
56
|
- public function getPageHtmlIsCustomized($source,$is_list){
|
57
|
+ public function getPageHtmlIsCustomized($source,$is_list,$is_custom){
|
|
|
|
58
|
+ if($is_custom == BTemplate::IS_CUSTOM){
|
|
|
|
59
|
+ $customModuleModel = new CustomModule();
|
|
|
|
60
|
+ $info = $customModuleModel->read(['id'=>$source]);
|
|
|
|
61
|
+ if($info === false){
|
|
|
|
62
|
+ $this->fail('当前扩展模块不存在或已被删除');
|
|
|
|
63
|
+ }
|
|
|
|
64
|
+ //扩展模块定制
|
|
|
|
65
|
+ if($is_list == BTemplate::IS_LIST && $info['list_customized'] == BTemplate::IS_VISUALIZATION){
|
|
|
|
66
|
+ return BTemplate::IS_VISUALIZATION;
|
|
|
|
67
|
+ }
|
|
|
|
68
|
+ if($is_list == BTemplate::IS_DETAIL && $info['detail_customized'] == BTemplate::IS_VISUALIZATION){
|
|
|
|
69
|
+ return BTemplate::IS_VISUALIZATION;
|
|
|
|
70
|
+ }
|
|
|
|
71
|
+ }else{
|
|
57
|
$type = $this->getCustomizedType($source, $is_list);//获取定制界面类型
|
72
|
$type = $this->getCustomizedType($source, $is_list);//获取定制界面类型
|
|
58
|
//查看当前页面是否定制,是否开启可视化
|
73
|
//查看当前页面是否定制,是否开启可视化
|
|
59
|
$page_array = (array)$this->user['is_visualization']->page_array;//获取所有定制界面
|
74
|
$page_array = (array)$this->user['is_visualization']->page_array;//获取所有定制界面
|
|
60
|
if (in_array($type, $page_array)) {//是定制界面
|
75
|
if (in_array($type, $page_array)) {//是定制界面
|
|
61
|
return BTemplate::IS_VISUALIZATION;
|
76
|
return BTemplate::IS_VISUALIZATION;
|
|
62
|
}
|
77
|
}
|
|
|
|
78
|
+ }
|
|
63
|
return BTemplate::IS_NO_VISUALIZATION;
|
79
|
return BTemplate::IS_NO_VISUALIZATION;
|
|
64
|
}
|
80
|
}
|
|
65
|
|
81
|
|
|
@@ -120,4 +136,37 @@ class UpdateHtml extends Controller |
|
@@ -120,4 +136,37 @@ class UpdateHtml extends Controller |
|
120
|
}
|
136
|
}
|
|
121
|
return $html;
|
137
|
return $html;
|
|
122
|
}
|
138
|
}
|
|
|
|
139
|
+
|
|
|
|
140
|
+ /**
|
|
|
|
141
|
+ * @remark :定制页面头部类型---根据source获取type类型
|
|
|
|
142
|
+ * @name :getType
|
|
|
|
143
|
+ * @author :lyh
|
|
|
|
144
|
+ * @method :post
|
|
|
|
145
|
+ * @time :2023/11/16 11:20
|
|
|
|
146
|
+ */
|
|
|
|
147
|
+ public function getCustomizedType($source,$is_list){
|
|
|
|
148
|
+ $type = BTemplate::TYPE_HOME;
|
|
|
|
149
|
+ if($source == BTemplate::SOURCE_PRODUCT){
|
|
|
|
150
|
+ if($is_list == BTemplate::IS_LIST){
|
|
|
|
151
|
+ $type = BTemplate::TYPE_PRODUCT_LIST;
|
|
|
|
152
|
+ }else{
|
|
|
|
153
|
+ $type = BTemplate::TYPE_PRODUCT_DETAIL;
|
|
|
|
154
|
+ }
|
|
|
|
155
|
+ }
|
|
|
|
156
|
+ if($source == BTemplate::SOURCE_BLOG){
|
|
|
|
157
|
+ if($is_list == BTemplate::IS_LIST){
|
|
|
|
158
|
+ $type = BTemplate::TYPE_BLOG_LIST;
|
|
|
|
159
|
+ }else{
|
|
|
|
160
|
+ $type = BTemplate::TYPE_BLOG_DETAIL;
|
|
|
|
161
|
+ }
|
|
|
|
162
|
+ }
|
|
|
|
163
|
+ if($source == BTemplate::SOURCE_NEWS){
|
|
|
|
164
|
+ if($is_list == BTemplate::IS_LIST){
|
|
|
|
165
|
+ $type = BTemplate::TYPE_NEWS_LIST;
|
|
|
|
166
|
+ }else{
|
|
|
|
167
|
+ $type = BTemplate::TYPE_NEWS_DETAIL;
|
|
|
|
168
|
+ }
|
|
|
|
169
|
+ }
|
|
|
|
170
|
+ return $type;
|
|
|
|
171
|
+ }
|
|
123
|
} |
172
|
} |