|
...
|
...
|
@@ -6,10 +6,14 @@ namespace App\Services\Html; |
|
|
|
use App\Helper\Translate;
|
|
|
|
use App\Models\Blog\Blog;
|
|
|
|
use App\Models\Blog\BlogCategory;
|
|
|
|
use App\Models\CustomModule\CustomModule;
|
|
|
|
use App\Models\CustomModule\CustomModuleCategory;
|
|
|
|
use App\Models\CustomModule\CustomModuleContent;
|
|
|
|
use App\Models\Module\CustomModuleExtendContent;
|
|
|
|
use App\Models\Module\Module;
|
|
|
|
use App\Models\Module\ModuleCategory;
|
|
|
|
use App\Models\Nav\BNav;
|
|
|
|
use App\Models\News\News;
|
|
|
|
use App\Models\News\NewsCategory;
|
|
|
|
use App\Models\Product\Category;
|
|
|
|
use App\Models\Product\CategoryRelated;
|
|
...
|
...
|
@@ -19,15 +23,20 @@ use App\Models\Product\ProductExtend; |
|
|
|
use App\Models\Product\ProductExtendInfo;
|
|
|
|
use App\Models\Project\Country;
|
|
|
|
use App\Models\Project\DeployBuild;
|
|
|
|
use App\Models\Project\PageSetting;
|
|
|
|
use App\Models\Project\Project;
|
|
|
|
use App\Models\Project\ProjectPageSetting;
|
|
|
|
use App\Models\Project\VisualizationHtml;
|
|
|
|
use App\Models\RouteMap\RouteMap;
|
|
|
|
use App\Models\Service\Service;
|
|
|
|
use App\Models\Template\BSetting;
|
|
|
|
use App\Models\Template\BTemplate;
|
|
|
|
use App\Models\Template\BTemplateCommon;
|
|
|
|
use App\Models\Template\Setting;
|
|
|
|
use App\Models\Template\TemplateTypeMain;
|
|
|
|
use App\Models\Template\WebTemplateMain;
|
|
|
|
use App\Models\Visualization\Visualization;
|
|
|
|
use App\Models\WebSetting\AggregationSetting;
|
|
|
|
use App\Models\WebSetting\SettingNum;
|
|
|
|
use App\Models\WebSetting\WebCustom;
|
|
|
|
use App\Models\WebSetting\WebLanguage;
|
|
|
|
use App\Models\WebSetting\WebSetting;
|
|
...
|
...
|
@@ -147,8 +156,6 @@ class PageService{ |
|
|
|
if (count($blockItemOuterDom) != 0){
|
|
|
|
$nav = BNav::where("project_id",$projectId)->where("group_id",$dataNavType)->orderBy("sort","asc")->orderBy("id","asc")->where("status",1)->get();
|
|
|
|
if (!empty($nav)){
|
|
|
|
//菜单第一种递归
|
|
|
|
// $nav = $this->tree($nav->toArray());
|
|
|
|
//菜单第二种递归
|
|
|
|
$nav = $this->treeLevel($nav->toArray());
|
|
|
|
// dd($nav);
|
|
...
|
...
|
@@ -187,7 +194,6 @@ class PageService{ |
|
|
|
$phpQueryDom=phpQuery::newDocument($content);
|
|
|
|
$navModule = $phpQueryDom["header [data-module=1]"];
|
|
|
|
$blockItemOuterDom = $navModule->find("[blockitem]")->eq(0);
|
|
|
|
|
|
|
|
$blockItemOuterDom->find("[blocklink]")->attr("href","hrefReplace");
|
|
|
|
$blockItemOuterDom->find("[blocklink]")->attr("title","hrefTitleReplace");
|
|
|
|
$blockItemOuterDom->find("[blocklink]")->attr("target","hrefTargetReplace");
|
|
...
|
...
|
@@ -287,7 +293,6 @@ class PageService{ |
|
|
|
if (!empty($products)){
|
|
|
|
$pageService = new PageService();
|
|
|
|
foreach ($products as $key => $item){
|
|
|
|
|
|
|
|
if ($item->icon == null || $item->icon == ""){
|
|
|
|
$productNews[$key]["icon"] =$item->icon;
|
|
|
|
}else{
|
|
...
|
...
|
@@ -319,7 +324,6 @@ class PageService{ |
|
|
|
if ($item->extendInfo->key == "pd_extended_field_1"){
|
|
|
|
$productNews[$key]["product_model"] =$item->extendInfo->values;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
...
|
...
|
@@ -347,14 +351,12 @@ class PageService{ |
|
|
|
}else{
|
|
|
|
$blockItemOuterDom->attr("class","");
|
|
|
|
}
|
|
|
|
|
|
|
|
if (isset($item->show)){
|
|
|
|
if ($item->show != 0){
|
|
|
|
$blockItemOuterDom->attr("data-sub-type",(string)$item->show);
|
|
|
|
$blockItemOuterDom->attr("class","nav-li-".(string)$item->show);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//a标签当前页和新页面跳转
|
|
|
|
if (isset($item->target)){
|
|
|
|
if ($item->target == 0) {
|
|
...
|
...
|
@@ -365,7 +367,6 @@ class PageService{ |
|
|
|
$blockItemOuterDom->find("a")->attr("href","javascript:;");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//1205项目定制导航新增产品
|
|
|
|
if ($item->level == 3 && $item->project_id == 1205){
|
|
|
|
$routeMap = RouteMap::where("route",$item->url)->first();
|
|
...
|
...
|
@@ -390,10 +391,8 @@ class PageService{ |
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
$outerHtml = $blockItemOuterDom->htmlOuter();
|
|
|
|
$blockItemOuterDom->find("ul")->remove();
|
|
|
|
|
|
|
|
return $outerHtml;
|
|
|
|
}
|
|
|
|
|
|
...
|
...
|
@@ -452,7 +451,7 @@ class PageService{ |
|
|
|
*/
|
|
|
|
public function assembleIndexPage($project,$webTemplate): string
|
|
|
|
{
|
|
|
|
$webTemplateCommon = WebTemplateCommon::where("project_id",$project->id)->where("template_id",$webTemplate->template_id)->where("type",1)->first();
|
|
|
|
$webTemplateCommon = BTemplateCommon::where("project_id",$project->id)->where("template_id",$webTemplate->template_id)->where("type",1)->first();
|
|
|
|
if (!empty($webTemplateCommon)){
|
|
|
|
$html = $webTemplateCommon->head_css.$webTemplate->main_css.$webTemplateCommon->footer_css.$webTemplateCommon->other.$webTemplateCommon->head_html.$webTemplate->main_html.$webTemplateCommon->footer_html;
|
|
|
|
$html = $this->getHeadFooter($html,$project->id);
|
|
...
|
...
|
@@ -475,7 +474,6 @@ class PageService{ |
|
|
|
Redis::set($projectId."_project_origin_head_footer", json_encode($list->toArray()));
|
|
|
|
Redis::expire($projectId."_project_origin_head_footer", WebSetting::$redisExpireTime);
|
|
|
|
}
|
|
|
|
|
|
|
|
$contentHeader = "";
|
|
|
|
$contentFooter = "";
|
|
|
|
//拼接html
|
|
...
|
...
|
@@ -491,7 +489,6 @@ class PageService{ |
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return $contentFooter;
|
|
|
|
}
|
|
|
|
|
|
...
|
...
|
@@ -503,13 +500,12 @@ class PageService{ |
|
|
|
{
|
|
|
|
$projectId = $project->id;
|
|
|
|
$publicTemplate = null;
|
|
|
|
$info = BSetting::where("project_id", $projectId)->first();
|
|
|
|
$info = Setting::where("project_id", $projectId)->first();
|
|
|
|
if (!empty($info)) {
|
|
|
|
$webTemplate = WebTemplate::where("project_id", $projectId)->where("template_id", $info->template_id)->where("source", 1)->first();
|
|
|
|
$webTemplate = BTemplate::where("project_id", $projectId)->where("template_id", $info->template_id)->where("source", 1)->first();
|
|
|
|
if (!empty($webTemplate)) {
|
|
|
|
$webTemplateCommon = WebTemplateCommon::where("project_id", $projectId)->where("template_id", $info->template_id)->where("type",1)->first();
|
|
|
|
$webTemplateCommon = BTemplateCommon::where("project_id", $projectId)->where("template_id", $info->template_id)->where("type",1)->first();
|
|
|
|
if (!empty($webTemplateCommon)){
|
|
|
|
// $html = $webTemplateCommon->head_css.$webTemplate->main_css.$webTemplateCommon->footer_css.$webTemplateCommon->other.$webTemplateCommon->head_html.$webTemplate->main_html.$webTemplateCommon->footer_html;
|
|
|
|
$html = $webTemplateCommon->head_css."<style id='globalsojs-styles'></style>".$webTemplateCommon->footer_css.$webTemplateCommon->other.$webTemplateCommon->head_html.$webTemplate->main_html.$webTemplateCommon->footer_html;
|
|
|
|
}else{
|
|
|
|
$html = $webTemplate->html;
|
|
...
|
...
|
@@ -560,28 +556,6 @@ class PageService{ |
|
|
|
$countryDom->find(".change-language-title b")->attr("class","country-flag language-flag-".$mainLang->short);
|
|
|
|
$countryDom->find(".change-language-title span")->text($mainLang->english);
|
|
|
|
}
|
|
|
|
|
|
|
|
//取消根据翻译状态,翻译tag状态显示主站小语种列表功能(2024.02.27)
|
|
|
|
// if ($project->id != 614){
|
|
|
|
// try {
|
|
|
|
// //判断翻译状态,翻译tag状态
|
|
|
|
// $keywordModel = new Keyword();
|
|
|
|
// if ((isset($routeMap->source) && $routeMap->source == WebTemplateCommon::$productKeywordName) || in_array($route,$keywordModel->product_keyword_route)){
|
|
|
|
// $isTranslateTag = $project->is_translate_tag != 0 ? $project->is_translate_tag : 0;
|
|
|
|
// if ($isTranslateTag == 0){
|
|
|
|
// $countryDom->find(".change-language-cont")->attr("style","display:none;");
|
|
|
|
// }
|
|
|
|
// }else{
|
|
|
|
// $isTranslate = $project->is_translate != 0 ? $project->is_translate : 0;
|
|
|
|
// if ($isTranslate == 0){
|
|
|
|
// $countryDom->find(".change-language-cont")->attr("style","display:none;");
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// } catch (\Exception $e) {
|
|
|
|
// return $content;
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
|
|
|
|
$block = "";
|
|
|
|
$blockItem = $countryDom->find("[blockitem]")->eq(0);
|
|
|
|
if (count($blockItem) < 1){
|
|
...
|
...
|
@@ -592,7 +566,7 @@ class PageService{ |
|
|
|
//关键词17种默认小语种
|
|
|
|
$keywordCountry = WebLanguage::getKeywordsCountry($project);
|
|
|
|
if (!empty($routeMap)){
|
|
|
|
if ($routeMap->source == WebTemplateCommon::$productKeywordName || $routeMap->source == WebTemplateCommon::$productKeywordListName){
|
|
|
|
if ($routeMap->source == RouteMap::SOURCE_PRODUCT_KEYWORD || $routeMap->source == 'product_keyword_list'){
|
|
|
|
$webCountry = $keywordCountry;
|
|
|
|
}else{
|
|
|
|
$webCountry = $projectCountry;
|
|
...
|
...
|
@@ -606,7 +580,6 @@ class PageService{ |
|
|
|
$webCountry = $projectCountry;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//判断当前项目是二级域名还是二级目录
|
|
|
|
$projectBuild = DeployBuild::where("project_id",$project->id)->first();
|
|
|
|
$linkingFormat = 1;
|
|
...
|
...
|
@@ -619,8 +592,6 @@ class PageService{ |
|
|
|
//语言列表
|
|
|
|
$domainEndStr = $project->domain_end == Project::$domainEndSlash ? "/" : "";
|
|
|
|
if (!empty($webCountry)){
|
|
|
|
//$routeMap = RouteMap::where("project_id",$project->id)->where("route",$route)->first();
|
|
|
|
$newRoute = "";
|
|
|
|
if (!empty($routeMap)){
|
|
|
|
if ($route == "index" || $route == ""){
|
|
|
|
$newRoute = "/" ;
|
|
...
|
...
|
@@ -672,7 +643,6 @@ class PageService{ |
|
|
|
$blockItem->attr("href","http://".$domainNow.$newRoute);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
$blockItem->attr("title",$v->english);
|
|
|
|
$shortLang = $v->short == "zh-ct" ? "zh-TW" : $v->short;
|
|
|
|
$blockItem->find("[blockicotype]")->eq(0)->attr("class","country-flag language-flag-".$shortLang);
|
|
...
|
...
|
@@ -706,7 +676,7 @@ class PageService{ |
|
|
|
if((int)$dataNavModule != 0){
|
|
|
|
$dataNavType = $countryDom->eq($i)->attr("data-nav-type");
|
|
|
|
$dataNavType = $dataNavType == null || $dataNavType=="" || $dataNavType=="default" ? 2 : (int)$dataNavType;
|
|
|
|
$navData = WebNav::where("project_id",$projectId)->where("group_id",$dataNavType)->orderBy("sort","asc")->orderBy("id","asc")->get();
|
|
|
|
$navData = BNav::where("project_id",$projectId)->where("group_id",$dataNavType)->orderBy("sort","asc")->orderBy("id","asc")->get();
|
|
|
|
|
|
|
|
if (!empty($navData)){
|
|
|
|
$navData = $this->tree($navData->toArray());
|
|
...
|
...
|
@@ -1154,20 +1124,6 @@ class PageService{ |
|
|
|
if ($product_category) {
|
|
|
|
$relatedProduct = CategoryRelated::where(['cate_id' => $product_category->cate_id])->where('product_id', '<>', $data->id)->inRandomOrder()->take(10)->pluck('product_id')->toArray();
|
|
|
|
}
|
|
|
|
// $categoryIdArr = !empty($data->category_id) ? explode(",",$data->category_id) : null;
|
|
|
|
// if (!empty($categoryIdArr)){
|
|
|
|
// $categoryIdArr = array_filter($categoryIdArr);
|
|
|
|
// if (!empty($categoryIdArr)){
|
|
|
|
// $categoryIdArr = array_map('intval', $categoryIdArr);
|
|
|
|
// $categoryIdArr=array_reverse($categoryIdArr);
|
|
|
|
// $productIdsList = CategoryRelated::whereIn("cate_id",$categoryIdArr)->orderByRaw(DB::raw("FIELD(cate_id,".implode(',',$categoryIdArr).")"))->get();
|
|
|
|
// if (!empty($productIdsList)){
|
|
|
|
// foreach ($productIdsList as $productIdsListItem){
|
|
|
|
// $relatedProduct[] = $productIdsListItem->product_id;
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
if (!empty($relatedProduct)){
|
|
|
|
$relatedProduct = array_filter($relatedProduct);
|
|
|
|
$relatedProduct = array_map('intval', $relatedProduct);
|
|
...
|
...
|
@@ -1272,7 +1228,7 @@ class PageService{ |
|
|
|
if (!empty($nesCategoryArr)){
|
|
|
|
$routerNewsMap = RouteMap::where("project_id",$projectId)->where("source",$source)->where("source_id",reset($nesCategoryArr))->first();
|
|
|
|
if (!empty($routerNewsMap)){
|
|
|
|
$newsCategoryInfo = WebNav::where("project_id",$projectId)->where("location","header")->where("status",1)->where("url",$routerNewsMap->route)->first();
|
|
|
|
$newsCategoryInfo = BNav::where("project_id",$projectId)->where("location","header")->where("status",1)->where("url",$routerNewsMap->route)->first();
|
|
|
|
if (!empty($newsCategoryInfo)){
|
|
|
|
return $newsCategoryInfo;
|
|
|
|
}
|
|
...
|
...
|
@@ -1325,7 +1281,7 @@ class PageService{ |
|
|
|
public function getInnerPageBanner($projectId,$route,$type)
|
|
|
|
{
|
|
|
|
$banners = [];
|
|
|
|
if ($type == WebTemplateCommon::$productCategoryName){
|
|
|
|
if ($type == RouteMap::SOURCE_PRODUCT_CATE){
|
|
|
|
$category = Category::where("project_id",$projectId)->where("status",1)->where("route",$route)->first();
|
|
|
|
if (!empty($category)){
|
|
|
|
if (isset($category->image) && !empty($category->image)){
|
|
...
|
...
|
@@ -1347,7 +1303,7 @@ class PageService{ |
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if ($type == WebTemplateCommon::$productName){
|
|
|
|
if ($type == RouteMap::SOURCE_PRODUCT){
|
|
|
|
$innerPageBanner = WebSettingImage::where("project_id",$projectId)->where("type",1)->first();
|
|
|
|
if (!empty($innerPageBanner)){
|
|
|
|
$banners["product_banner"] = $innerPageBanner->image;
|
|
...
|
...
|
@@ -1355,7 +1311,7 @@ class PageService{ |
|
|
|
$banners["product_banner"] = "";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if ($type == WebTemplateCommon::$newsCategoryName || $type == WebTemplateCommon::$newsName || $type == WebTemplateCommon::$extendCategoryName || $type == WebTemplateCommon::$extendName){
|
|
|
|
if ($type == RouteMap::SOURCE_NEWS_CATE || $type == RouteMap::SOURCE_NEWS || $type == RouteMap::SOURCE_MODULE_CATE || $type == RouteMap::SOURCE_MODULE){
|
|
|
|
$innerPageBanner = WebSettingImage::where("project_id",$projectId)->where("type",3)->first();
|
|
|
|
if (!empty($innerPageBanner)){
|
|
|
|
$banners["news_banner"] = $innerPageBanner->image;
|
|
...
|
...
|
@@ -1363,7 +1319,7 @@ class PageService{ |
|
|
|
$banners["news_banner"] = "";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if ($type == WebTemplateCommon::$blogCategoryName || $type == WebTemplateCommon::$blogName){
|
|
|
|
if ($type == RouteMap::SOURCE_BLOG_CATE || $type == RouteMap::SOURCE_BLOG){
|
|
|
|
$innerPageBanner = WebSettingImage::where("project_id",$projectId)->where("type",2)->first();
|
|
|
|
if (!empty($innerPageBanner)){
|
|
|
|
$banners["blog_banner"] = $innerPageBanner->image;
|
|
...
|
...
|
@@ -1402,7 +1358,7 @@ class PageService{ |
|
|
|
public function getNewsCategoryInfoByRoute($projectId,$newRoute)
|
|
|
|
{
|
|
|
|
if ($newRoute != ''){
|
|
|
|
$newsCategoryInfo = WebNav::where("project_id",$projectId)->where("location","header")->where("status",1)->where("url",$newRoute)->first();
|
|
|
|
$newsCategoryInfo = BNav::where("project_id",$projectId)->where("location","header")->where("status",1)->where("url",$newRoute)->first();
|
|
|
|
if (!empty($newsCategoryInfo)){
|
|
|
|
return $newsCategoryInfo;
|
|
|
|
}
|
|
...
|
...
|
@@ -1468,22 +1424,22 @@ class PageService{ |
|
|
|
$page = (int)$page;
|
|
|
|
}
|
|
|
|
$count = 0;
|
|
|
|
if ($type == WebTemplateCommon::$productCategoryName){
|
|
|
|
$webSettingNum = WebSettingNum::where("project_id",$projectId)->where("type",WebSettingNum::$productListType)->orderBy("id","desc")->first();
|
|
|
|
if ($type == RouteMap::SOURCE_PRODUCT_CATE){
|
|
|
|
$webSettingNum = SettingNum::where("project_id",$projectId)->where("type",SettingNum::$productListType)->orderBy("id","desc")->first();
|
|
|
|
if (!empty($webSettingNum)){
|
|
|
|
$perPage = (int)$webSettingNum->num;
|
|
|
|
}else{
|
|
|
|
$perPage = Category::$productCategoryPagePercent; //产品每页条数
|
|
|
|
}
|
|
|
|
}elseif($type == WebTemplateCommon::$newsCategoryName || $type == WebTemplateCommon::$extendCategoryName){
|
|
|
|
$webSettingNum = WebSettingNum::where("project_id",$projectId)->where("type",WebSettingNum::$newsListType)->orderBy("id","desc")->first();
|
|
|
|
}elseif($type == RouteMap::SOURCE_NEWS_CATE || $type == RouteMap::SOURCE_MODULE_CATE){
|
|
|
|
$webSettingNum = SettingNum::where("project_id",$projectId)->where("type",SettingNum::$newsListType)->orderBy("id","desc")->first();
|
|
|
|
if (!empty($webSettingNum)){
|
|
|
|
$perPage = (int)$webSettingNum->num;
|
|
|
|
}else{
|
|
|
|
$perPage = NewsCategory::$newsCategoryPagePercent; //新闻每页条数
|
|
|
|
}
|
|
|
|
}else{
|
|
|
|
$webSettingNum = WebSettingNum::where("project_id",$projectId)->where("type",WebSettingNum::$blogListType)->orderBy("id","desc")->first();
|
|
|
|
$webSettingNum = SettingNum::where("project_id",$projectId)->where("type",SettingNum::$blogListType)->orderBy("id","desc")->first();
|
|
|
|
if (!empty($webSettingNum)){
|
|
|
|
$perPage = (int)$webSettingNum->num;
|
|
|
|
}else{
|
|
...
|
...
|
@@ -1493,26 +1449,26 @@ class PageService{ |
|
|
|
|
|
|
|
$offset = ($page - 1) * $perPage;
|
|
|
|
//总条数
|
|
|
|
if ($type == WebTemplateCommon::$newsCategoryName){
|
|
|
|
if ($type == RouteMap::SOURCE_NEWS_CATE){
|
|
|
|
if ($routerMap->route == "news" || $routerMap->source_id == 0){
|
|
|
|
$count = News::where("project_id",$projectId)->select("id")->where("status",1)->orderBy("id","DESC")->count();
|
|
|
|
}else{
|
|
|
|
$count = News::where("project_id",$projectId)->select("id")->where("category_id","like","%".",".$routerMap->source_id.","."%")->where("status",1)->orderBy("id","DESC")->count();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if ($type == WebTemplateCommon::$blogCategoryName){
|
|
|
|
if ($type == RouteMap::SOURCE_BLOG_CATE){
|
|
|
|
if ($routerMap->route == "blog" && $routerMap->source_id == 0){
|
|
|
|
$count = Blog::where("project_id",$projectId)->where("status",1)->orderBy("id","DESC")->count();
|
|
|
|
}else{
|
|
|
|
$count = Blog::where("project_id",$projectId)->where("category_id","like","%".",".$routerMap->source_id.","."%")->where("status",1)->orderBy("id","DESC")->count();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if ($type == WebTemplateCommon::$extendCategoryName){
|
|
|
|
if ($type == RouteMap::SOURCE_MODULE_CATE){
|
|
|
|
$moduleCategoryInfo = ModuleCategory::getModuleCategoryAndExtendById($projectId,$routerMap->source_id);
|
|
|
|
$count = Module::where("project_id",$projectId)->select("id")->where("module_id",$moduleCategoryInfo->module_id)->where("category_id","like","%".",".$routerMap->source_id.","."%")->where("status",0)->orderBy("id","DESC")->count();
|
|
|
|
}
|
|
|
|
//临时改成这种,之后调整
|
|
|
|
if ($type == WebTemplateCommon::$productCategoryName){
|
|
|
|
if ($type == RouteMap::SOURCE_PRODUCT_CATE){
|
|
|
|
$productModel = Product::where("project_id",$projectId);
|
|
|
|
if ($routerMap->route != "products"){
|
|
|
|
$categoryArr = $this->getProductListByCategoryId($routerMap,$projectId);
|
|
...
|
...
|
@@ -1600,7 +1556,7 @@ class PageService{ |
|
|
|
}else{
|
|
|
|
$page = (int)$page;
|
|
|
|
}
|
|
|
|
$webSettingNum = WebSettingNum::where("project_id",$project->id)->where("type",WebSettingNum::$productListType)->orderBy("id","desc")->first();
|
|
|
|
$webSettingNum = SettingNum::where("project_id",$project->id)->where("type",SettingNum::$productListType)->orderBy("id","desc")->first();
|
|
|
|
if (!empty($webSettingNum)){
|
|
|
|
$perPage = (int)$webSettingNum->num;
|
|
|
|
}else{
|
|
...
|
...
|
@@ -1864,23 +1820,14 @@ class PageService{ |
|
|
|
}
|
|
|
|
if (count($productIds)<7){
|
|
|
|
$randomData = Product::where("project_id", $project->id)->where("status",1)->whereNotIn('id', $productIds)->inRandomOrder()->take(13-count($productIds))->get();
|
|
|
|
//优化
|
|
|
|
// $product_all_id = Product::where("project_id", $project->id)->whereNotIn('id', $productIds)->where("status",1)->pluck('id')->toArray();
|
|
|
|
// $product_id = array_rand($product_all_id, 13-count($productIds));
|
|
|
|
// $randomData = Product::where("project_id", $project->id)->whereIn("id", $product_id)->get();
|
|
|
|
$finalData = $productsQuery->merge($randomData);
|
|
|
|
}else{
|
|
|
|
$finalData = $productsQuery;
|
|
|
|
}
|
|
|
|
}else{
|
|
|
|
$finalData = Product::where("project_id", $project->id)->where("status",1)->inRandomOrder()->take(13)->get();
|
|
|
|
//优化
|
|
|
|
// $product_all_id = Product::where("project_id", $project->id)->where("status",1)->pluck('id')->toArray();
|
|
|
|
// $product_id = array_rand($product_all_id, 13);
|
|
|
|
// $finalData = Product::where("project_id", $project->id)->whereIn("id", $product_id)->get();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!empty($finalData)) {
|
|
|
|
$finalData = $this->productListDataHandle($finalData);
|
|
|
|
if (!empty($finalData)){
|
|
...
|
...
|
@@ -2075,7 +2022,7 @@ class PageService{ |
|
|
|
default:
|
|
|
|
//是否是自定义模块
|
|
|
|
if (!empty($moduleDataModule)){
|
|
|
|
$moduleArr = Module::isModule($moduleDataModule);
|
|
|
|
$moduleArr = CustomModuleContent::isModule($moduleDataModule);
|
|
|
|
if (!empty($moduleArr)){
|
|
|
|
if (isset($moduleArr[0]) && $moduleArr[1] && !empty($moduleArr[0]) && !empty($moduleArr[1]) && $moduleArr[0] == "custom"){
|
|
|
|
$query = Module::where("project_id",$projectId)->where("module_id",$moduleArr[1])->where("status",0);
|
|
...
|
...
|
@@ -2111,7 +2058,7 @@ class PageService{ |
|
|
|
if ((int)$moduleDataModule == 4){
|
|
|
|
$query = $query->where("pid",$dataType);
|
|
|
|
}else{
|
|
|
|
$isModule = Module::isModule($moduleDataModule);
|
|
|
|
$isModule = CustomModuleContent::isModule($moduleDataModule);
|
|
|
|
if (!is_array($isModule)){
|
|
|
|
//产品处理
|
|
|
|
if ((int)$moduleDataModule == 1){
|
|
...
|
...
|
@@ -2463,7 +2410,7 @@ class PageService{ |
|
|
|
$moduleCategory = array_filter($moduleCategory);
|
|
|
|
if (!empty($moduleCategory)){
|
|
|
|
$moduleCategoryId = (int)array_shift($moduleCategory);
|
|
|
|
$moduleCategoryInfo = ModuleCategory::where("project_id",$projectId)->where("id",$moduleCategoryId)->first();
|
|
|
|
$moduleCategoryInfo = CustomModuleCategory::where("project_id",$projectId)->where("id",$moduleCategoryId)->first();
|
|
|
|
if (!empty($moduleCategoryInfo)){
|
|
|
|
$categoryRoute = $moduleCategoryInfo->route . "/";
|
|
|
|
}
|
|
...
|
...
|
@@ -2518,7 +2465,7 @@ class PageService{ |
|
|
|
|
|
|
|
public function blokItemDatahandle($projectId,$moduleDataModule,$blockDom,$queryItem,$key,$moduleDataImageType=null,$moduleDataIcoType=null,$dataTitleCharLength=0,$dataDescCharLength=0,$blockContentVideo=null)
|
|
|
|
{
|
|
|
|
$isModule = Module::isModule($moduleDataModule);
|
|
|
|
$isModule = CustomModuleContent::isModule($moduleDataModule);
|
|
|
|
if (is_array($isModule)){
|
|
|
|
//自定义扩展模块
|
|
|
|
$this->moduleBlockHandle($projectId,$moduleDataModule,$blockDom,$queryItem,$dataTitleCharLength,$dataDescCharLength,$moduleDataImageType,$moduleDataIcoType,$key,$blockContentVideo);
|
|
...
|
...
|
@@ -2579,13 +2526,13 @@ class PageService{ |
|
|
|
$li.=$this->singLeftNavHandle($project,$v,$type,$categoryInfo);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if ($type == WebTemplateCommon::$productCategoryName){
|
|
|
|
if ($type == RouteMap::SOURCE_PRODUCT_CATE){
|
|
|
|
if (strpos($nav["route"], 'http://') !== false || strpos($nav["route"], 'https://') !== false) {
|
|
|
|
return '<li data-page="'.$nav["route"].'"><a href="'.$nav["route"].'">'.$nav["title"].'</a><ul>'.$li.'</ul></li>';
|
|
|
|
}else{
|
|
|
|
return '<li data-page="'.$nav["route"].'"><a href="/'.$nav["route"].'">'.$nav["title"].'</a><ul>'.$li.'</ul></li>';
|
|
|
|
}
|
|
|
|
}elseif($type == WebTemplateCommon::$newsCategoryName){
|
|
|
|
}elseif($type == RouteMap::SOURCE_NEWS_CATE){
|
|
|
|
if (strpos($nav["alias"], 'http://') !== false || strpos($nav["alias"], 'https://') !== false) {
|
|
|
|
return '<li data-page="'.$nav["alias"].'"><a href="'.$nav["alias"].'">'.$nav["name"].'</a><ul>'.$li.'</ul></li>';
|
|
|
|
}else{
|
|
...
|
...
|
@@ -2599,7 +2546,7 @@ class PageService{ |
|
|
|
return '<li data-page="'.$nav["alias"].'"><a href="/'.$nav["alias"].'">'.$nav["name"].'</a><ul>'.$li.'</ul></li>';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}elseif($type == WebTemplateCommon::$extendCategoryName){
|
|
|
|
}elseif($type == RouteMap::SOURCE_MODULE_CATE){
|
|
|
|
if (strpos($nav["route"], 'http://') !== false || strpos($nav["route"], 'https://') !== false) {
|
|
|
|
return '<li data-page="'.$nav["route"].'"><a href="'.$nav["route"].'">'.$nav["name"].'</a><ul>'.$li.'</ul></li>';
|
|
|
|
}else{
|
|
...
|
...
|
@@ -2613,7 +2560,7 @@ class PageService{ |
|
|
|
return '<li data-page="'.$nav["route"].'"><a href="/'.$nav["route"].'/">'.$nav["name"].'</a></li>';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}elseif($type == WebTemplateCommon::$blogCategoryName){
|
|
|
|
}elseif($type == RouteMap::SOURCE_BLOG_CATE){
|
|
|
|
if (strpos($nav["alias"], 'http://') !== false || strpos($nav["alias"], 'https://') !== false) {
|
|
|
|
return '<li data-page="'.$nav["alias"].'"><a href="'.$nav["alias"].'">'.$nav["name"].'</a><ul>'.$li.'</ul></li>';
|
|
|
|
}else{
|
|
...
|
...
|
@@ -2656,13 +2603,13 @@ class PageService{ |
|
|
|
*/
|
|
|
|
public function singLeftNavHandle($project,$nav,$type,$categoryInfo=null): string
|
|
|
|
{
|
|
|
|
if ($type == WebTemplateCommon::$productCategoryName){
|
|
|
|
if ($type == RouteMap::SOURCE_PRODUCT_CATE){
|
|
|
|
if (strpos($nav["route"], 'http://') !== false || strpos($nav["route"], 'https://') !== false) {
|
|
|
|
return '<li data-page="'.$nav["route"].'"><a href="'.$nav["route"].'">'.$nav["title"].'</a></li>';
|
|
|
|
}else{
|
|
|
|
return '<li data-page="'.$nav["route"].'"><a href="/'.$nav["route"].'">'.$nav["title"].'</a></li>';
|
|
|
|
}
|
|
|
|
}elseif($type == WebTemplateCommon::$newsCategoryName){
|
|
|
|
}elseif($type == RouteMap::SOURCE_NEWS_CATE){
|
|
|
|
if (strpos($nav["alias"], 'http://') !== false || strpos($nav["alias"], 'https://') !== false) {
|
|
|
|
return '<li data-page="'.$nav["alias"].'"><a href="'.$nav["alias"].'">'.$nav["name"].'</a></li>';
|
|
|
|
}else{
|
|
...
|
...
|
@@ -2676,7 +2623,7 @@ class PageService{ |
|
|
|
return '<li data-page="'.$nav["alias"].'"><a href="/'.$nav["alias"].'/">'.$nav["name"].'</a></li>';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}elseif($type == WebTemplateCommon::$extendCategoryName){
|
|
|
|
}elseif($type == RouteMap::SOURCE_MODULE_CATE){
|
|
|
|
if (strpos($nav["route"], 'http://') !== false || strpos($nav["route"], 'https://') !== false) {
|
|
|
|
return '<li data-page="'.$nav["route"].'"><a href="'.$nav["route"].'">'.$nav["name"].'</a></li>';
|
|
|
|
}else{
|
|
...
|
...
|
@@ -2690,7 +2637,7 @@ class PageService{ |
|
|
|
return '<li data-page="'.$nav["route"].'"><a href="/'.$nav["route"].'/">'.$nav["name"].'</a></li>';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}elseif($type == WebTemplateCommon::$blogCategoryName){
|
|
|
|
}elseif($type == RouteMap::SOURCE_BLOG_CATE){
|
|
|
|
if (strpos($nav["alias"], 'http://') !== false || strpos($nav["alias"], 'https://') !== false) {
|
|
|
|
return '<li data-page="'.$nav["alias"].'"><a href="'.$nav["alias"].'">'.$nav["name"].'</a></li>';
|
|
|
|
}else{
|
|
...
|
...
|
@@ -3036,9 +2983,9 @@ class PageService{ |
|
|
|
{
|
|
|
|
$relatedProductDom = $phpQueryDom->find("[productparameters]")->eq(0);
|
|
|
|
if (count($relatedProductDom) >= 1){
|
|
|
|
$templateInfo= BSetting::where("project_id",$project->id)->first();
|
|
|
|
$templateInfo= Setting::where("project_id",$project->id)->first();
|
|
|
|
if (!empty($templateInfo)){
|
|
|
|
$webTemplateQuery = WebTemplate::where("project_id",$project->id)->where("status",0)->where("template_id",$templateInfo->template_id)->where("source",WebTemplateCommon::$productSource)->where("source_id",$data["id"])->first();
|
|
|
|
$webTemplateQuery = BTemplate::where("project_id",$project->id)->where("status",0)->where("template_id",$templateInfo->template_id)->where("source",WebTemplateCommon::$productSource)->where("source_id",$data["id"])->first();
|
|
|
|
if (empty($webTemplateQuery)){
|
|
|
|
//tab切换
|
|
|
|
$blockTab = "";
|
|
...
|
...
|
@@ -3213,14 +3160,7 @@ class PageService{ |
|
|
|
$navItemHtml = $nabHtml;
|
|
|
|
|
|
|
|
if ($dataNavType >= 1){
|
|
|
|
// $nav = null;
|
|
|
|
// $flattenedArray = WebNavGroup::getNavGroupSortListByID($projectId,$dataNavType);
|
|
|
|
// if (!empty($flattenedArray)){
|
|
|
|
// $nav = WebNav::where("project_id",$projectId)->whereIn('id', $flattenedArray)->orderByRaw(DB::raw("FIELD(id, " . implode(",", $flattenedArray) . ")"))->where("group_id",$dataNavType)->where("status",1)->get();
|
|
|
|
// }else{
|
|
|
|
// $nav = WebNav::where("project_id",$projectId)->where("group_id",$dataNavType)->orderBy("sort","desc")->orderBy("id","desc")->where("status",1)->get();
|
|
|
|
// }
|
|
|
|
$nav = WebNav::where("project_id",$projectId)->where("group_id",$dataNavType)->orderBy("sort","asc")->orderBy("id","asc")->where("status",1)->get();
|
|
|
|
$nav = BNav::where("project_id",$projectId)->where("group_id",$dataNavType)->orderBy("sort","asc")->orderBy("id","asc")->where("status",1)->get();
|
|
|
|
if (!empty($nav)){
|
|
|
|
$nav = $this->tree($nav->toArray());
|
|
|
|
$nav = json_decode(json_encode($nav));
|
|
...
|
...
|
@@ -3406,32 +3346,32 @@ class PageService{ |
|
|
|
*/
|
|
|
|
public function visualizationHtmlHeaderHandle($html,$project,$type,$routerMap)
|
|
|
|
{
|
|
|
|
$webTemplateCommon = WebTemplateCommon::where("project_id",$project->id)->where("template_id",0);
|
|
|
|
if ($type == WebTemplateCommon::$indexName){
|
|
|
|
$webTemplateCommon = BTemplateCommon::where("project_id",$project->id)->where("template_id",0);
|
|
|
|
if ($type == RouteMap::SOURCE_INDEX){
|
|
|
|
$webTemplateCommon = $webTemplateCommon->where("type",1)->where("is_custom",0)->first();
|
|
|
|
}
|
|
|
|
if ($type == WebTemplateCommon::$productName){
|
|
|
|
if ($type == RouteMap::SOURCE_PRODUCT){
|
|
|
|
$webTemplateCommon = $webTemplateCommon->where("type",2)->where("is_custom",0)->first();
|
|
|
|
}
|
|
|
|
if ($type == WebTemplateCommon::$productCategoryName){
|
|
|
|
if ($type == RouteMap::SOURCE_PRODUCT_CATE){
|
|
|
|
$webTemplateCommon = $webTemplateCommon->where("type",3)->where("is_custom",0)->first();
|
|
|
|
}
|
|
|
|
if ($type == WebTemplateCommon::$blogName){
|
|
|
|
if ($type == RouteMap::SOURCE_BLOG){
|
|
|
|
$webTemplateCommon = $webTemplateCommon->where("type",4)->where("is_custom",0)->first();
|
|
|
|
}
|
|
|
|
if ($type == WebTemplateCommon::$blogCategoryName){
|
|
|
|
if ($type == RouteMap::SOURCE_PRODUCT_CATE){
|
|
|
|
$webTemplateCommon = $webTemplateCommon->where("type",5)->where("is_custom",0)->first();
|
|
|
|
}
|
|
|
|
if ($type == WebTemplateCommon::$newsName){
|
|
|
|
if ($type == RouteMap::SOURCE_NEWS){
|
|
|
|
$webTemplateCommon = $webTemplateCommon->where("type",6)->where("is_custom",0)->first();
|
|
|
|
}
|
|
|
|
if ($type == WebTemplateCommon::$newsCategoryName){
|
|
|
|
if ($type == RouteMap::SOURCE_NEWS_CATE){
|
|
|
|
$webTemplateCommon = $webTemplateCommon->where("type",7)->where("is_custom",0)->first();
|
|
|
|
}
|
|
|
|
if ($type == WebTemplateCommon::$extendName){
|
|
|
|
$modules = Module::where("project_id",$project->id)->where("status",0)->where("id",$routerMap->source_id)->first();
|
|
|
|
if ($type == RouteMap::SOURCE_MODULE){
|
|
|
|
$modules = CustomModuleContent::where("project_id",$project->id)->where("status",0)->where("id",$routerMap->source_id)->first();
|
|
|
|
if (!empty($modules)){
|
|
|
|
$moduleCategoryInfo = Module::getModuleCategory($project->id,$modules);
|
|
|
|
$moduleCategoryInfo = CustomModuleContent::getModuleCategory($project->id,$modules);
|
|
|
|
if (isset($moduleCategoryInfo->getExtend->id)){
|
|
|
|
$webTemplateCommon = $webTemplateCommon->where("type",$moduleCategoryInfo->getExtend->id)->where("is_custom",1)->where("is_list",0)->first();
|
|
|
|
}else{
|
|
...
|
...
|
@@ -3441,8 +3381,8 @@ class PageService{ |
|
|
|
$webTemplateCommon = null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if ($type == WebTemplateCommon::$extendCategoryName){
|
|
|
|
$moduleInfo = ModuleCategory::getModuleCategoryAndExtendById($project->id,$routerMap->source_id);
|
|
|
|
if ($type == RouteMap::SOURCE_MODULE_CATE){
|
|
|
|
$moduleInfo = CustomModuleCategory::getModuleCategoryAndExtendById($project->id,$routerMap->source_id);
|
|
|
|
if (isset($moduleInfo->getExtend->id)){
|
|
|
|
$webTemplateCommon = $webTemplateCommon->where("type",$moduleInfo->getExtend->id)->where("is_custom",1)->where("is_list",1)->first();
|
|
|
|
}else{
|
|
...
|
...
|
@@ -3450,7 +3390,7 @@ class PageService{ |
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!empty($webTemplateCommon) && $type != WebTemplateCommon::$pageName && $type != WebTemplateCommon::$productKeywordName){
|
|
|
|
if (!empty($webTemplateCommon) && $type != RouteMap::SOURCE_PAGE && $type != RouteMap::SOURCE_PRODUCT_KEYWORD){
|
|
|
|
$html = $this->handleAllHtml($webTemplateCommon,$html);
|
|
|
|
}
|
|
|
|
$content = $html;
|
|
...
|
...
|
@@ -3477,19 +3417,19 @@ class PageService{ |
|
|
|
$html = $this->isAndGetVisualizationHtml($project,$type,$routerMap);
|
|
|
|
if ($html == ""){
|
|
|
|
//查看项目所属模板信息
|
|
|
|
$templateInfo= BSetting::where("project_id",$project->id)->first();
|
|
|
|
$templateInfo= Setting::where("project_id",$project->id)->first();
|
|
|
|
if ($templateInfo == null){
|
|
|
|
return $this->response("error",WebSetting::$errStatus,"No homepage template set");
|
|
|
|
}
|
|
|
|
|
|
|
|
//取头部数据,查看是否开启页面独立头部
|
|
|
|
$webTemplateHeaderFooterIndependence = null;
|
|
|
|
$webTemplateCommonOuterQuery = WebTemplateCommon::where("project_id",$project->id)->where("template_id",$templateInfo->template_id);
|
|
|
|
$webTemplateCommonOuterQuery = BTemplateCommon::where("project_id",$project->id)->where("template_id",$templateInfo->template_id);
|
|
|
|
$projectBuild = DeployBuild::where("project_id",$project->id)->first();
|
|
|
|
if (!empty($projectBuild)){
|
|
|
|
$configuration = json_decode($projectBuild->configuration);
|
|
|
|
if (isset($configuration->is_head) && $configuration->is_head == 1){
|
|
|
|
$projectPageSetting = ProjectPageSetting::where("project_id",$project->id)->first();
|
|
|
|
$projectPageSetting = PageSetting::where("project_id",$project->id)->first();
|
|
|
|
if (!empty($projectPageSetting)){
|
|
|
|
//有独立头部,取 gl_web_template_common 表对应的头部底部(html+css)
|
|
|
|
$webTemplateHeaderFooterIndependence = $this->getPageHeadDataByType($project,$projectPageSetting,$type,$templateInfo,$routerMap);
|
|
...
|
...
|
@@ -3528,43 +3468,43 @@ class PageService{ |
|
|
|
}
|
|
|
|
}
|
|
|
|
switch ($type) {
|
|
|
|
case WebTemplateCommon::$productName:
|
|
|
|
if (!empty($isVisualizationArr) && in_array((string)WebTemplateCommon::$productSource,$isVisualizationArr)){
|
|
|
|
case RouteMap::SOURCE_PRODUCT:
|
|
|
|
if (!empty($isVisualizationArr) && in_array((string)BTemplate::TYPE_PRODUCT_DETAIL,$isVisualizationArr)){
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case WebTemplateCommon::$productCategoryName:
|
|
|
|
if (!empty($isVisualizationArr) && in_array((string)WebTemplateCommon::$productCategory,$isVisualizationArr)){
|
|
|
|
case RouteMap::SOURCE_PRODUCT_CATE:
|
|
|
|
if (!empty($isVisualizationArr) && in_array((string)BTemplate::TYPE_PRODUCT_LIST,$isVisualizationArr)){
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case WebTemplateCommon::$blogName:
|
|
|
|
if (!empty($isVisualizationArr) && in_array((string)WebTemplateCommon::$blog,$isVisualizationArr)){
|
|
|
|
case RouteMap::SOURCE_BLOG:
|
|
|
|
if (!empty($isVisualizationArr) && in_array((string)BTemplate::TYPE_BLOG_DETAIL,$isVisualizationArr)){
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case WebTemplateCommon::$blogCategoryName:
|
|
|
|
if (!empty($isVisualizationArr) && in_array((string)WebTemplateCommon::$blogCategory,$isVisualizationArr)){
|
|
|
|
case RouteMap::SOURCE_BLOG_CATE:
|
|
|
|
if (!empty($isVisualizationArr) && in_array((string)BTemplate::TYPE_BLOG_LIST,$isVisualizationArr)){
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case WebTemplateCommon::$newsName:
|
|
|
|
if (!empty($isVisualizationArr) && in_array((string)WebTemplateCommon::$news,$isVisualizationArr)){
|
|
|
|
case RouteMap::SOURCE_NEWS:
|
|
|
|
if (!empty($isVisualizationArr) && in_array((string)BTemplate::TYPE_NEWS_DETAIL,$isVisualizationArr)){
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case WebTemplateCommon::$newsCategoryName:
|
|
|
|
if (!empty($isVisualizationArr) && in_array((string)WebTemplateCommon::$newsCategory,$isVisualizationArr)){
|
|
|
|
case RouteMap::SOURCE_NEWS_CATE:
|
|
|
|
if (!empty($isVisualizationArr) && in_array((string)BTemplate::TYPE_NEWS_LIST,$isVisualizationArr)){
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case WebTemplateCommon::$indexName:
|
|
|
|
if (!empty($isVisualizationArr) && in_array((string)WebTemplateCommon::$index,$isVisualizationArr)){
|
|
|
|
case RouteMap::SOURCE_INDEX:
|
|
|
|
if (!empty($isVisualizationArr) && in_array((string)BTemplate::TYPE_HOME,$isVisualizationArr)){
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case WebTemplateCommon::$pageName:
|
|
|
|
if (!empty($isVisualizationArr) && in_array((string)WebTemplateCommon::$pageIsVisualization,$isVisualizationArr)){
|
|
|
|
case RouteMap::SOURCE_PAGE:
|
|
|
|
if (!empty($isVisualizationArr) && in_array((string)BTemplate::TYPE_CUSTOM_PAGE,$isVisualizationArr)){
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
break;
|
|
...
|
...
|
@@ -3581,7 +3521,7 @@ class PageService{ |
|
|
|
{
|
|
|
|
$html = "";
|
|
|
|
$isVisualizationArr = [];
|
|
|
|
$visualizationHtmlQuery = VisualizationHtml::where("project_id",$project->id);
|
|
|
|
$visualizationHtmlQuery = Visualization::where("project_id",$project->id);
|
|
|
|
if (isset($project->is_visualization) && !empty($project->is_visualization)){
|
|
|
|
$isVisualization = json_decode($project->is_visualization);
|
|
|
|
if (isset($isVisualization->page_array) && !empty($isVisualization->page_array)){
|
...
|
...
|
|