|
...
|
...
|
@@ -11,6 +11,7 @@ namespace App\Http\Controllers\Html; |
|
|
|
|
|
|
|
use App\Http\Controllers\Controller;
|
|
|
|
use App\Models\Com\NoticeLog;
|
|
|
|
use App\Models\CustomModule\CustomModule;
|
|
|
|
use App\Models\Project\Project;
|
|
|
|
use App\Models\RouteMap\RouteMap;
|
|
|
|
use App\Models\Service\Service as ServiceSettingModel;
|
|
...
|
...
|
@@ -53,13 +54,28 @@ class UpdateHtml extends Controller |
|
|
|
* @method :post
|
|
|
|
* @time :2024/2/2 11:03
|
|
|
|
*/
|
|
|
|
public function getPageHtmlIsCustomized($source,$is_list){
|
|
|
|
public function getPageHtmlIsCustomized($source,$is_list,$is_custom){
|
|
|
|
if($is_custom == BTemplate::IS_CUSTOM){
|
|
|
|
$customModuleModel = new CustomModule();
|
|
|
|
$info = $customModuleModel->read(['id'=>$source]);
|
|
|
|
if($info === false){
|
|
|
|
$this->fail('当前扩展模块不存在或已被删除');
|
|
|
|
}
|
|
|
|
//扩展模块定制
|
|
|
|
if($is_list == BTemplate::IS_LIST && $info['list_customized'] == BTemplate::IS_VISUALIZATION){
|
|
|
|
return BTemplate::IS_VISUALIZATION;
|
|
|
|
}
|
|
|
|
if($is_list == BTemplate::IS_DETAIL && $info['detail_customized'] == BTemplate::IS_VISUALIZATION){
|
|
|
|
return BTemplate::IS_VISUALIZATION;
|
|
|
|
}
|
|
|
|
}else{
|
|
|
|
$type = $this->getCustomizedType($source, $is_list);//获取定制界面类型
|
|
|
|
//查看当前页面是否定制,是否开启可视化
|
|
|
|
$page_array = (array)$this->user['is_visualization']->page_array;//获取所有定制界面
|
|
|
|
if (in_array($type, $page_array)) {//是定制界面
|
|
|
|
return BTemplate::IS_VISUALIZATION;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return BTemplate::IS_NO_VISUALIZATION;
|
|
|
|
}
|
|
|
|
|
|
...
|
...
|
@@ -120,4 +136,37 @@ class UpdateHtml extends Controller |
|
|
|
}
|
|
|
|
return $html;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :定制页面头部类型---根据source获取type类型
|
|
|
|
* @name :getType
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2023/11/16 11:20
|
|
|
|
*/
|
|
|
|
public function getCustomizedType($source,$is_list){
|
|
|
|
$type = BTemplate::TYPE_HOME;
|
|
|
|
if($source == BTemplate::SOURCE_PRODUCT){
|
|
|
|
if($is_list == BTemplate::IS_LIST){
|
|
|
|
$type = BTemplate::TYPE_PRODUCT_LIST;
|
|
|
|
}else{
|
|
|
|
$type = BTemplate::TYPE_PRODUCT_DETAIL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if($source == BTemplate::SOURCE_BLOG){
|
|
|
|
if($is_list == BTemplate::IS_LIST){
|
|
|
|
$type = BTemplate::TYPE_BLOG_LIST;
|
|
|
|
}else{
|
|
|
|
$type = BTemplate::TYPE_BLOG_DETAIL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if($source == BTemplate::SOURCE_NEWS){
|
|
|
|
if($is_list == BTemplate::IS_LIST){
|
|
|
|
$type = BTemplate::TYPE_NEWS_LIST;
|
|
|
|
}else{
|
|
|
|
$type = BTemplate::TYPE_NEWS_DETAIL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return $type;
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|