|
@@ -9,6 +9,7 @@ use App\Models\Blog\BlogCategory; |
|
@@ -9,6 +9,7 @@ use App\Models\Blog\BlogCategory; |
|
9
|
use App\Models\CustomModule\CustomModule;
|
9
|
use App\Models\CustomModule\CustomModule;
|
|
10
|
use App\Models\CustomModule\CustomModuleCategory;
|
10
|
use App\Models\CustomModule\CustomModuleCategory;
|
|
11
|
use App\Models\CustomModule\CustomModuleContent;
|
11
|
use App\Models\CustomModule\CustomModuleContent;
|
|
|
|
12
|
+use App\Models\CustomModule\CustomModuleExtentContent;
|
|
12
|
use App\Models\Module\CustomModuleExtendContent;
|
13
|
use App\Models\Module\CustomModuleExtendContent;
|
|
13
|
use App\Models\Module\Module;
|
14
|
use App\Models\Module\Module;
|
|
14
|
use App\Models\Module\ModuleCategory;
|
15
|
use App\Models\Module\ModuleCategory;
|
|
@@ -17,6 +18,8 @@ use App\Models\News\News; |
|
@@ -17,6 +18,8 @@ use App\Models\News\News; |
|
17
|
use App\Models\News\NewsCategory;
|
18
|
use App\Models\News\NewsCategory;
|
|
18
|
use App\Models\Product\Category;
|
19
|
use App\Models\Product\Category;
|
|
19
|
use App\Models\Product\CategoryRelated;
|
20
|
use App\Models\Product\CategoryRelated;
|
|
|
|
21
|
+use App\Models\Product\Extend;
|
|
|
|
22
|
+use App\Models\Product\ExtendInfo;
|
|
20
|
use App\Models\Product\Keyword;
|
23
|
use App\Models\Product\Keyword;
|
|
21
|
use App\Models\Product\Product;
|
24
|
use App\Models\Product\Product;
|
|
22
|
use App\Models\Product\ProductExtend;
|
25
|
use App\Models\Product\ProductExtend;
|
|
@@ -29,8 +32,10 @@ use App\Models\Project\ProjectPageSetting; |
|
@@ -29,8 +32,10 @@ use App\Models\Project\ProjectPageSetting; |
|
29
|
use App\Models\Project\VisualizationHtml;
|
32
|
use App\Models\Project\VisualizationHtml;
|
|
30
|
use App\Models\RouteMap\RouteMap;
|
33
|
use App\Models\RouteMap\RouteMap;
|
|
31
|
use App\Models\Service\Service;
|
34
|
use App\Models\Service\Service;
|
|
|
|
35
|
+use App\Models\Template\BCustomTemplate;
|
|
32
|
use App\Models\Template\BTemplate;
|
36
|
use App\Models\Template\BTemplate;
|
|
33
|
use App\Models\Template\BTemplateCommon;
|
37
|
use App\Models\Template\BTemplateCommon;
|
|
|
|
38
|
+use App\Models\Template\BTemplateMain;
|
|
34
|
use App\Models\Template\Setting;
|
39
|
use App\Models\Template\Setting;
|
|
35
|
use App\Models\Template\TemplateTypeMain;
|
40
|
use App\Models\Template\TemplateTypeMain;
|
|
36
|
use App\Models\Template\WebTemplateMain;
|
41
|
use App\Models\Template\WebTemplateMain;
|
|
@@ -3521,7 +3526,6 @@ class PageService{ |
|
@@ -3521,7 +3526,6 @@ class PageService{ |
|
3521
|
{
|
3526
|
{
|
|
3522
|
$html = "";
|
3527
|
$html = "";
|
|
3523
|
$isVisualizationArr = [];
|
3528
|
$isVisualizationArr = [];
|
|
3524
|
- $visualizationHtmlQuery = Visualization::where("project_id",$project->id);
|
|
|
|
3525
|
if (isset($project->is_visualization) && !empty($project->is_visualization)){
|
3529
|
if (isset($project->is_visualization) && !empty($project->is_visualization)){
|
|
3526
|
$isVisualization = json_decode($project->is_visualization);
|
3530
|
$isVisualization = json_decode($project->is_visualization);
|
|
3527
|
if (isset($isVisualization->page_array) && !empty($isVisualization->page_array)){
|
3531
|
if (isset($isVisualization->page_array) && !empty($isVisualization->page_array)){
|
|
@@ -3529,76 +3533,115 @@ class PageService{ |
|
@@ -3529,76 +3533,115 @@ class PageService{ |
|
3529
|
}
|
3533
|
}
|
|
3530
|
}
|
3534
|
}
|
|
3531
|
switch ($type) {
|
3535
|
switch ($type) {
|
|
3532
|
- case WebTemplateCommon::$productName:
|
|
|
|
3533
|
- if (!empty($isVisualizationArr) && in_array((string)WebTemplateCommon::$productSource,$isVisualizationArr)){
|
|
|
|
3534
|
- $productVisualHtml = WebTemplate::where("project_id",$project->id)->where("source",WebTemplateCommon::$product)->where("source_id",$routerMap->source_id)->where("template_id",0)->first();
|
3536
|
+ case RouteMap::SOURCE_PRODUCT:
|
|
|
|
3537
|
+ if (!empty($isVisualizationArr) && in_array((string)BTemplate::TYPE_PRODUCT_DETAIL,$isVisualizationArr)){
|
|
|
|
3538
|
+ $productVisualHtml = BTemplate::where("project_id",$project->id)->where("source",BTemplate::SOURCE_PRODUCT)->where("source_id",$routerMap->source_id)->where("template_id",0)->first();
|
|
3535
|
if (!empty($productVisualHtml)){
|
3539
|
if (!empty($productVisualHtml)){
|
|
3536
|
$html = $productVisualHtml->html;
|
3540
|
$html = $productVisualHtml->html;
|
|
3537
|
}else{
|
3541
|
}else{
|
|
3538
|
- $visualizationHtmlQuery = WebTemplateMain::where("project_id",$project->id)->where("type",WebTemplateCommon::$product)->where("is_list",0)->first();
|
3542
|
+ $visualizationHtmlQuery = BTemplateMain::where("project_id",$project->id)->where("type",BTemplate::SOURCE_PRODUCT)->where("is_list",0)->first();
|
|
3539
|
if (!empty($visualizationHtmlQuery)){
|
3543
|
if (!empty($visualizationHtmlQuery)){
|
|
3540
|
$html = $visualizationHtmlQuery->main_html;
|
3544
|
$html = $visualizationHtmlQuery->main_html;
|
|
3541
|
}
|
3545
|
}
|
|
3542
|
}
|
3546
|
}
|
|
3543
|
}
|
3547
|
}
|
|
3544
|
break;
|
3548
|
break;
|
|
3545
|
- case WebTemplateCommon::$productCategoryName:
|
|
|
|
3546
|
- if (!empty($isVisualizationArr) && in_array((string)WebTemplateCommon::$productCategory,$isVisualizationArr)){
|
|
|
|
3547
|
- $param = ['type'=>WebTemplateCommon::$product,'is_list'=>1];
|
|
|
|
3548
|
- $visualizationHtmlQuery = WebTemplateMain::where("project_id",$project->id)->where($param)->first();
|
|
|
|
3549
|
- if (!empty($visualizationHtmlQuery)){
|
|
|
|
3550
|
- $html = $visualizationHtmlQuery->main_html;
|
3549
|
+ case RouteMap::SOURCE_PRODUCT_CATE:
|
|
|
|
3550
|
+ if (!empty($isVisualizationArr) && in_array((string)BTemplate::TYPE_PRODUCT_LIST,$isVisualizationArr)){
|
|
|
|
3551
|
+ $productCateVisualHtml = BTemplate::where("project_id",$project->id)->where([
|
|
|
|
3552
|
+ 'source'=>BTemplate::SOURCE_PRODUCT, 'source_id'=>$routerMap->source_id, 'is_list'=>BTemplate::IS_LIST, 'template_id'=>0
|
|
|
|
3553
|
+ ])->first();
|
|
|
|
3554
|
+ if (!empty($productVisualHtml)){
|
|
|
|
3555
|
+ $html = $productCateVisualHtml->html;
|
|
|
|
3556
|
+ }else{
|
|
|
|
3557
|
+ $visualizationHtmlQuery = BTemplateMain::where("project_id",$project->id)->where(
|
|
|
|
3558
|
+ ['type'=>BTemplate::SOURCE_PRODUCT,'is_list'=>BTemplate::IS_LIST]
|
|
|
|
3559
|
+ )->first();
|
|
|
|
3560
|
+ if (!empty($visualizationHtmlQuery)){
|
|
|
|
3561
|
+ $html = $visualizationHtmlQuery->main_html;
|
|
|
|
3562
|
+ }
|
|
3551
|
}
|
3563
|
}
|
|
3552
|
}
|
3564
|
}
|
|
3553
|
break;
|
3565
|
break;
|
|
3554
|
- case WebTemplateCommon::$blogName:
|
|
|
|
3555
|
- if (!empty($isVisualizationArr) && in_array((string)WebTemplateCommon::$blog,$isVisualizationArr)){
|
|
|
|
3556
|
- $param = ['type'=>WebTemplateCommon::$main_blog,'is_list'=>0];
|
|
|
|
3557
|
- $newsVisualizationHtml = WebTemplateMain::where("project_id",$project->id)->where($param)->first();
|
|
|
|
3558
|
- if (!empty($newsVisualizationHtml)){
|
|
|
|
3559
|
- $html = $newsVisualizationHtml->main_html;
|
3566
|
+ case RouteMap::SOURCE_BLOG:
|
|
|
|
3567
|
+ if (!empty($isVisualizationArr) && in_array((string)BTemplate::TYPE_BLOG_DETAIL,$isVisualizationArr)){
|
|
|
|
3568
|
+ $newsVisualHtml = BTemplate::where("project_id",$project->id)->where([
|
|
|
|
3569
|
+ 'source'=>BTemplate::SOURCE_BLOG, 'source_id'=>$routerMap->source_id, 'is_list'=>BTemplate::IS_DETAIL, 'template_id'=>0
|
|
|
|
3570
|
+ ])->first();
|
|
|
|
3571
|
+ if (!empty($newsVisualHtml)){
|
|
|
|
3572
|
+ $html = $newsVisualHtml->html;
|
|
|
|
3573
|
+ }else{
|
|
|
|
3574
|
+ $param = ['type'=>BTemplate::SOURCE_BLOG,'is_list'=>BTemplate::IS_DETAIL];
|
|
|
|
3575
|
+ $newsVisualizationHtml = BTemplateMain::where("project_id",$project->id)->where($param)->first();
|
|
|
|
3576
|
+ if (!empty($newsVisualizationHtml)){
|
|
|
|
3577
|
+ $html = $newsVisualizationHtml->main_html;
|
|
|
|
3578
|
+ }
|
|
3560
|
}
|
3579
|
}
|
|
3561
|
}
|
3580
|
}
|
|
3562
|
break;
|
3581
|
break;
|
|
3563
|
- case WebTemplateCommon::$blogCategoryName:
|
|
|
|
3564
|
- if (!empty($isVisualizationArr) && in_array((string)WebTemplateCommon::$blogCategory,$isVisualizationArr)){
|
|
|
|
3565
|
- $visualizationHtmlQuery = WebTemplate::where("project_id",$project->id)->where("source",WebTemplateCommon::$blogSource)->where("source_id",0)->where("template_id",0)->first();
|
3582
|
+ case RouteMap::SOURCE_BLOG_CATE:
|
|
|
|
3583
|
+ if (!empty($isVisualizationArr) && in_array((string)BTemplate::TYPE_BLOG_LIST,$isVisualizationArr)){
|
|
|
|
3584
|
+ $visualizationHtmlQuery = BTemplate::where("project_id",$project->id)->where(
|
|
|
|
3585
|
+ ['source'=>BTemplate::SOURCE_BLOG, 'source_id'=>$routerMap->source_id, 'is_list'=>BTemplate::IS_LIST, 'template_id'=>0
|
|
|
|
3586
|
+ ])->first();
|
|
3566
|
if (!empty($visualizationHtmlQuery)){
|
3587
|
if (!empty($visualizationHtmlQuery)){
|
|
3567
|
$html = $visualizationHtmlQuery->html;
|
3588
|
$html = $visualizationHtmlQuery->html;
|
|
|
|
3589
|
+ }else{
|
|
|
|
3590
|
+ $param = ['type'=>BTemplate::SOURCE_BLOG,'is_list'=>BTemplate::IS_LIST];
|
|
|
|
3591
|
+ $newsVisualizationHtml = BTemplateMain::where("project_id",$project->id)->where($param)->first();
|
|
|
|
3592
|
+ if (!empty($newsVisualizationHtml)){
|
|
|
|
3593
|
+ $html = $newsVisualizationHtml->main_html;
|
|
|
|
3594
|
+ }
|
|
3568
|
}
|
3595
|
}
|
|
3569
|
}
|
3596
|
}
|
|
3570
|
break;
|
3597
|
break;
|
|
3571
|
- case WebTemplateCommon::$newsName:
|
|
|
|
3572
|
- if (!empty($isVisualizationArr) && in_array((string)WebTemplateCommon::$news,$isVisualizationArr)){
|
|
|
|
3573
|
- $param = ['type'=>WebTemplateCommon::$main_news,'is_list'=>0];
|
|
|
|
3574
|
- $newsVisualizationHtml = WebTemplateMain::where("project_id",$project->id)->where($param)->first();
|
|
|
|
3575
|
- if (!empty($newsVisualizationHtml)){
|
|
|
|
3576
|
- $html = $newsVisualizationHtml->main_html;
|
3598
|
+ case RouteMap::SOURCE_NEWS:
|
|
|
|
3599
|
+ if (!empty($isVisualizationArr) && in_array((string)BTemplate::TYPE_NEWS_DETAIL,$isVisualizationArr)){
|
|
|
|
3600
|
+ $visualizationHtmlQuery = BTemplate::where("project_id",$project->id)->where(
|
|
|
|
3601
|
+ ['source'=>BTemplate::SOURCE_NEWS, 'source_id'=>$routerMap->source_id, 'is_list'=>BTemplate::IS_DETAIL, 'template_id'=>0
|
|
|
|
3602
|
+ ])->first();
|
|
|
|
3603
|
+ if (!empty($visualizationHtmlQuery)){
|
|
|
|
3604
|
+ $html = $visualizationHtmlQuery->html;
|
|
|
|
3605
|
+ }else{
|
|
|
|
3606
|
+ $param = ['type'=>BTemplate::SOURCE_NEWS,'is_list'=>BTemplate::IS_DETAIL];
|
|
|
|
3607
|
+ $newsVisualizationHtml = BTemplateMain::where("project_id",$project->id)->where($param)->first();
|
|
|
|
3608
|
+ if (!empty($newsVisualizationHtml)){
|
|
|
|
3609
|
+ $html = $newsVisualizationHtml->main_html;
|
|
|
|
3610
|
+ }
|
|
3577
|
}
|
3611
|
}
|
|
|
|
3612
|
+
|
|
3578
|
}
|
3613
|
}
|
|
3579
|
break;
|
3614
|
break;
|
|
3580
|
- case WebTemplateCommon::$newsCategoryName:
|
|
|
|
3581
|
- if (!empty($isVisualizationArr) && in_array((string)WebTemplateCommon::$newsCategory,$isVisualizationArr)){
|
|
|
|
3582
|
- $visualizationHtmlQuery = WebTemplate::where("project_id",$project->id)->where("source",WebTemplateCommon::$newsSource)->where("source_id",0)->where("template_id",0)->first();
|
3615
|
+ case RouteMap::SOURCE_NEWS_CATE:
|
|
|
|
3616
|
+ if (!empty($isVisualizationArr) && in_array((string)BTemplate::TYPE_NEWS_LIST,$isVisualizationArr)){
|
|
|
|
3617
|
+ $visualizationHtmlQuery = BTemplate::where("project_id",$project->id)->where(
|
|
|
|
3618
|
+ ['source'=>BTemplate::SOURCE_NEWS, 'source_id'=>$routerMap->source_id, 'is_list'=>BTemplate::IS_LIST, 'template_id'=>0]
|
|
|
|
3619
|
+ )->first();
|
|
3583
|
if (!empty($visualizationHtmlQuery)){
|
3620
|
if (!empty($visualizationHtmlQuery)){
|
|
3584
|
$html = $visualizationHtmlQuery->html;
|
3621
|
$html = $visualizationHtmlQuery->html;
|
|
|
|
3622
|
+ }else{
|
|
|
|
3623
|
+ $param = ['type'=>BTemplate::SOURCE_NEWS,'is_list'=>BTemplate::IS_DETAIL];
|
|
|
|
3624
|
+ $newsVisualizationHtml = BTemplateMain::where("project_id",$project->id)->where($param)->first();
|
|
|
|
3625
|
+ if (!empty($newsVisualizationHtml)){
|
|
|
|
3626
|
+ $html = $newsVisualizationHtml->main_html;
|
|
|
|
3627
|
+ }
|
|
3585
|
}
|
3628
|
}
|
|
3586
|
}
|
3629
|
}
|
|
3587
|
break;
|
3630
|
break;
|
|
3588
|
- case WebTemplateCommon::$indexName:
|
|
|
|
3589
|
- if (!empty($isVisualizationArr) && in_array((string)WebTemplateCommon::$index,$isVisualizationArr)){
|
|
|
|
3590
|
- $visualizationHtmlQuery = WebTemplate::where("project_id",$project->id)->where("source",WebTemplateCommon::$index)->where("source_id",0)->where("template_id",0)->first();
|
3631
|
+ case RouteMap::SOURCE_INDEX:
|
|
|
|
3632
|
+ if (!empty($isVisualizationArr) && in_array((string)BTemplate::TYPE_HOME,$isVisualizationArr)){
|
|
|
|
3633
|
+ $visualizationHtmlQuery = BTemplate::where("project_id",$project->id)->where("source",BTemplate::SOURCE_HOME)->where("source_id",0)->where("template_id",0)->first();
|
|
3591
|
if (!empty($visualizationHtmlQuery)){
|
3634
|
if (!empty($visualizationHtmlQuery)){
|
|
3592
|
$html = $visualizationHtmlQuery->html;
|
3635
|
$html = $visualizationHtmlQuery->html;
|
|
3593
|
}
|
3636
|
}
|
|
3594
|
}
|
3637
|
}
|
|
3595
|
break;
|
3638
|
break;
|
|
3596
|
- case WebTemplateCommon::$extendCategoryName:
|
|
|
|
3597
|
- $moduleCategoryInfo = ModuleCategory::getModuleCategoryAndExtendById($project->id,$routerMap->source_id);
|
3639
|
+ case RouteMap::SOURCE_MODULE_CATE:
|
|
|
|
3640
|
+ $moduleCategoryInfo = CustomModuleCategory::getModuleCategoryAndExtendById($project->id,$routerMap->source_id);
|
|
3598
|
if (isset($moduleCategoryInfo->getExtend->list_customized) && $moduleCategoryInfo->getExtend->list_customized == 1){
|
3641
|
if (isset($moduleCategoryInfo->getExtend->list_customized) && $moduleCategoryInfo->getExtend->list_customized == 1){
|
|
3599
|
- $visualizationHtmlQuery = WebTemplate::where("project_id",$project->id)->where("source",$moduleCategoryInfo->getExtend->id)->where("source_id",$routerMap->source_id)->where("template_id",0)->where("is_custom",1)->where("is_list",1)->first();
|
3642
|
+ $visualizationHtmlQuery = BTemplate::where("project_id",$project->id)->where("source",$moduleCategoryInfo->getExtend->id)->where("source_id",$routerMap->source_id)->where("template_id",0)->where("is_custom",1)->where("is_list",1)->first();
|
|
3600
|
if (empty($visualizationHtmlQuery)){
|
3643
|
if (empty($visualizationHtmlQuery)){
|
|
3601
|
- $webTemplateMainInfo = WebTemplateMain::where("project_id",$project->id)->where("type",$moduleCategoryInfo->getExtend->id)->where("is_custom",1)->where("is_list",1)->first();
|
3644
|
+ $webTemplateMainInfo = BTemplateMain::where("project_id",$project->id)->where("type",$moduleCategoryInfo->getExtend->id)->where("is_custom",1)->where("is_list",1)->first();
|
|
3602
|
if (!empty($webTemplateMainInfo)){
|
3645
|
if (!empty($webTemplateMainInfo)){
|
|
3603
|
$html = $webTemplateMainInfo->main_html;
|
3646
|
$html = $webTemplateMainInfo->main_html;
|
|
3604
|
}
|
3647
|
}
|
|
@@ -3607,12 +3650,12 @@ class PageService{ |
|
@@ -3607,12 +3650,12 @@ class PageService{ |
|
3607
|
}
|
3650
|
}
|
|
3608
|
}
|
3651
|
}
|
|
3609
|
break;
|
3652
|
break;
|
|
3610
|
- case WebTemplateCommon::$extendName:
|
|
|
|
3611
|
- $moduleInfo = Module::getModuleAndExtendById($project->id,$routerMap->source_id);
|
3653
|
+ case RouteMap::SOURCE_MODULE:
|
|
|
|
3654
|
+ $moduleInfo = CustomModuleContent::getModuleAndExtendById($project->id,$routerMap->source_id);
|
|
3612
|
if (isset($moduleInfo->getExtend->detail_customized) && $moduleInfo->getExtend->detail_customized == 1){
|
3655
|
if (isset($moduleInfo->getExtend->detail_customized) && $moduleInfo->getExtend->detail_customized == 1){
|
|
3613
|
- $visualizationHtmlQuery = WebTemplate::where("project_id",$project->id)->where("source",$moduleInfo->getExtend->id)->where("source_id",$routerMap->source_id)->where("template_id",0)->where("is_custom",1)->where("is_list",0)->first();
|
3656
|
+ $visualizationHtmlQuery = BTemplate::where("project_id",$project->id)->where("source",$moduleInfo->getExtend->id)->where("source_id",$routerMap->source_id)->where("template_id",0)->where("is_custom",1)->where("is_list",0)->first();
|
|
3614
|
if (empty($visualizationHtmlQuery)){
|
3657
|
if (empty($visualizationHtmlQuery)){
|
|
3615
|
- $webTemplateMainInfo = WebTemplateMain::where("project_id",$project->id)->where("type",$moduleInfo->getExtend->id)->where("is_custom",1)->where("is_list",0)->first();
|
3658
|
+ $webTemplateMainInfo = BTemplateMain::where("project_id",$project->id)->where("type",$moduleInfo->getExtend->id)->where("is_custom",1)->where("is_list",0)->first();
|
|
3616
|
if (!empty($webTemplateMainInfo)){
|
3659
|
if (!empty($webTemplateMainInfo)){
|
|
3617
|
$html = $webTemplateMainInfo->main_html;
|
3660
|
$html = $webTemplateMainInfo->main_html;
|
|
3618
|
}
|
3661
|
}
|
|
@@ -3621,15 +3664,15 @@ class PageService{ |
|
@@ -3621,15 +3664,15 @@ class PageService{ |
|
3621
|
}
|
3664
|
}
|
|
3622
|
}
|
3665
|
}
|
|
3623
|
break;
|
3666
|
break;
|
|
3624
|
- case WebTemplateCommon::$pageName:
|
|
|
|
3625
|
- if (!empty($isVisualizationArr) && in_array((string)WebTemplateCommon::$pageIsVisualization,$isVisualizationArr)){
|
|
|
|
3626
|
- $visualizationHtmlQuery = WebCustom::where("id",$routerMap->source_id)->first();
|
3667
|
+ case RouteMap::SOURCE_PAGE:
|
|
|
|
3668
|
+ if (!empty($isVisualizationArr) && in_array((string)BTemplate::TYPE_CUSTOM_PAGE,$isVisualizationArr)){
|
|
|
|
3669
|
+ $visualizationHtmlQuery = BCustomTemplate::where("id",$routerMap->source_id)->first();
|
|
3627
|
if ($visualizationHtmlQuery->is_visualization == 0 || $visualizationHtmlQuery->is_visualization == 1){
|
3670
|
if ($visualizationHtmlQuery->is_visualization == 0 || $visualizationHtmlQuery->is_visualization == 1){
|
|
3628
|
- $templateInfo= BSetting::where("project_id",$project->id)->first();
|
3671
|
+ $templateInfo= Setting::where("project_id",$project->id)->first();
|
|
3629
|
if (!empty($templateInfo)){
|
3672
|
if (!empty($templateInfo)){
|
|
3630
|
//取头部数据,查看是否开启页面独立头部
|
3673
|
//取头部数据,查看是否开启页面独立头部
|
|
3631
|
- $projectPageSetting = ProjectPageSetting::where("project_id",$project->id)->first();
|
|
|
|
3632
|
- $webTemplateCommonOuterQuery = WebTemplateCommon::where("project_id",$project->id)->where("template_id",$templateInfo->template_id);
|
3674
|
+ $projectPageSetting = PageSetting::where("project_id",$project->id)->first();
|
|
|
|
3675
|
+ $webTemplateCommonOuterQuery = BTemplateCommon::where("project_id",$project->id)->where("template_id",$templateInfo->template_id);
|
|
3633
|
if (!empty($projectPageSetting)){
|
3676
|
if (!empty($projectPageSetting)){
|
|
3634
|
//有独立头部,取 gl_web_template_common 表对应的头部底部(html+css)
|
3677
|
//有独立头部,取 gl_web_template_common 表对应的头部底部(html+css)
|
|
3635
|
$webTemplateHeaderFooterIndependence = $this->getPageHeadDataByType($project,$projectPageSetting,$type,$templateInfo,$routerMap);
|
3678
|
$webTemplateHeaderFooterIndependence = $this->getPageHeadDataByType($project,$projectPageSetting,$type,$templateInfo,$routerMap);
|
|
@@ -3670,37 +3713,37 @@ class PageService{ |
|
@@ -3670,37 +3713,37 @@ class PageService{ |
|
3670
|
public function getPageMainByType($project,$type,$routerMap,$templateInfo)
|
3713
|
public function getPageMainByType($project,$type,$routerMap,$templateInfo)
|
|
3671
|
{
|
3714
|
{
|
|
3672
|
//在gl_web_template表中取装修数据
|
3715
|
//在gl_web_template表中取装修数据
|
|
3673
|
- $webTemplateQuery = WebTemplate::where("project_id",$project->id)->where("status",0)->where("template_id",$templateInfo->template_id);
|
3716
|
+ $webTemplateQuery = BTemplate::where("project_id",$project->id)->where("status",0)->where("template_id",$templateInfo->template_id);
|
|
3674
|
switch ($type) {
|
3717
|
switch ($type) {
|
|
3675
|
- case WebTemplateCommon::$productName:
|
|
|
|
3676
|
- $webTemplateQuery = $webTemplateQuery->where("source",WebTemplateCommon::$productSource)->where("source_id",$routerMap->source_id)->where("is_list",0)->first();
|
3718
|
+ case RouteMap::SOURCE_PRODUCT:
|
|
|
|
3719
|
+ $webTemplateQuery = $webTemplateQuery->where("source",BTemplate::SOURCE_PRODUCT)->where("source_id",$routerMap->source_id)->where("is_list",0)->first();
|
|
3677
|
break;
|
3720
|
break;
|
|
3678
|
- case WebTemplateCommon::$productCategoryName:
|
|
|
|
3679
|
- $webTemplateQuery = $webTemplateQuery->where("source",WebTemplateCommon::$productSource)->where("source_id",$routerMap->source_id)->where("is_list",1)->first();
|
3721
|
+ case RouteMap::SOURCE_PRODUCT_CATE:
|
|
|
|
3722
|
+ $webTemplateQuery = $webTemplateQuery->where("source",BTemplate::SOURCE_PRODUCT)->where("source_id",$routerMap->source_id)->where("is_list",1)->first();
|
|
3680
|
break;
|
3723
|
break;
|
|
3681
|
- case WebTemplateCommon::$blogName:
|
|
|
|
3682
|
- $webTemplateQuery = $webTemplateQuery->where("source",WebTemplateCommon::$blogSource)->where("source_id",$routerMap->source_id)->where("is_list",0)->first();
|
3724
|
+ case RouteMap::SOURCE_BLOG:
|
|
|
|
3725
|
+ $webTemplateQuery = $webTemplateQuery->where("source",BTemplate::SOURCE_BLOG)->where("source_id",$routerMap->source_id)->where("is_list",0)->first();
|
|
3683
|
break;
|
3726
|
break;
|
|
3684
|
- case WebTemplateCommon::$blogCategoryName:
|
|
|
|
3685
|
- $webTemplateQuery = $webTemplateQuery->where("source",WebTemplateCommon::$blogSource)->where("source_id",$routerMap->source_id)->where("is_list",1)->first();
|
3727
|
+ case RouteMap::SOURCE_BLOG_CATE:
|
|
|
|
3728
|
+ $webTemplateQuery = $webTemplateQuery->where("source",BTemplate::SOURCE_BLOG)->where("source_id",$routerMap->source_id)->where("is_list",1)->first();
|
|
3686
|
break;
|
3729
|
break;
|
|
3687
|
- case WebTemplateCommon::$newsName:
|
|
|
|
3688
|
- $webTemplateQuery = $webTemplateQuery->where("source",WebTemplateCommon::$newsSource)->where("source_id",$routerMap->source_id)->where("is_list",0)->first();
|
3730
|
+ case RouteMap::SOURCE_NEWS:
|
|
|
|
3731
|
+ $webTemplateQuery = $webTemplateQuery->where("source",BTemplate::SOURCE_NEWS)->where("source_id",$routerMap->source_id)->where("is_list",0)->first();
|
|
3689
|
break;
|
3732
|
break;
|
|
3690
|
- case WebTemplateCommon::$newsCategoryName:
|
|
|
|
3691
|
- $webTemplateQuery = $webTemplateQuery->where("source",WebTemplateCommon::$newsSource)->where("source_id",$routerMap->source_id)->where("is_list",1)->first();
|
3733
|
+ case RouteMap::SOURCE_NEWS_CATE:
|
|
|
|
3734
|
+ $webTemplateQuery = $webTemplateQuery->where("source",BTemplate::SOURCE_NEWS)->where("source_id",$routerMap->source_id)->where("is_list",1)->first();
|
|
3692
|
break;
|
3735
|
break;
|
|
3693
|
- case WebTemplateCommon::$extendName:
|
3736
|
+ case RouteMap::SOURCE_MODULE:
|
|
3694
|
$webTemplateQuery = $webTemplateQuery->where("source_id",$routerMap->source_id)->where("is_custom",1)->where("is_list",0)->first();
|
3737
|
$webTemplateQuery = $webTemplateQuery->where("source_id",$routerMap->source_id)->where("is_custom",1)->where("is_list",0)->first();
|
|
3695
|
break;
|
3738
|
break;
|
|
3696
|
- case WebTemplateCommon::$extendCategoryName:
|
3739
|
+ case RouteMap::SOURCE_MODULE_CATE:
|
|
3697
|
$webTemplateQuery = $webTemplateQuery->where("source_id",$routerMap->source_id)->where("is_list",1)->where("is_custom",1)->first();
|
3740
|
$webTemplateQuery = $webTemplateQuery->where("source_id",$routerMap->source_id)->where("is_list",1)->where("is_custom",1)->first();
|
|
3698
|
break;
|
3741
|
break;
|
|
3699
|
- case WebTemplateCommon::$productKeywordName:
|
|
|
|
3700
|
- $webTemplateQuery = $webTemplateQuery->where("source",WebTemplateCommon::$productKeywordSource)->where("source_id",$routerMap->source_id)->first();
|
3742
|
+ case RouteMap::SOURCE_PRODUCT_KEYWORD:
|
|
|
|
3743
|
+ $webTemplateQuery = $webTemplateQuery->where("source",BTemplate::SOURCE_KEYWORD)->where("source_id",$routerMap->source_id)->first();
|
|
3701
|
break;
|
3744
|
break;
|
|
3702
|
- case WebTemplateCommon::$pageName:
|
|
|
|
3703
|
- $webTemplate = WebCustom::where("project_id",$project->id)->where("id",$routerMap->source_id)->where("status",1)->first();
|
3745
|
+ case RouteMap::SOURCE_PAGE:
|
|
|
|
3746
|
+ $webTemplate = BCustomTemplate::where("project_id",$project->id)->where("id",$routerMap->source_id)->where("status",1)->first();
|
|
3704
|
if (!empty($webTemplate)){
|
3747
|
if (!empty($webTemplate)){
|
|
3705
|
$webTemplateQuery->main_html = $webTemplate->html;
|
3748
|
$webTemplateQuery->main_html = $webTemplate->html;
|
|
3706
|
$webTemplateQuery->main_css = $webTemplate->html_style;
|
3749
|
$webTemplateQuery->main_css = $webTemplate->html_style;
|
|
@@ -3713,30 +3756,30 @@ class PageService{ |
|
@@ -3713,30 +3756,30 @@ class PageService{ |
|
3713
|
}
|
3756
|
}
|
|
3714
|
|
3757
|
|
|
3715
|
//当4种列表页在gl_web_template表中没有装修数据,取中间模板装修表,则在原始表中gl_template_type_main那模板
|
3758
|
//当4种列表页在gl_web_template表中没有装修数据,取中间模板装修表,则在原始表中gl_template_type_main那模板
|
|
3716
|
- if ($type == WebTemplateCommon::$productCategoryName || $type == WebTemplateCommon::$blogCategoryName || $type == WebTemplateCommon::$newsCategoryName || $type == WebTemplateCommon::$productKeywordName || $type == WebTemplateCommon::$extendCategoryName){
|
3759
|
+ if ($type == RouteMap::SOURCE_PRODUCT_CATE || $type == RouteMap::SOURCE_BLOG_CATE || $type == RouteMap::SOURCE_NEWS_CATE || $type == RouteMap::SOURCE_PRODUCT_KEYWORD || $type == RouteMap::SOURCE_MODULE_CATE){
|
|
3717
|
if (empty($webTemplateQuery)){
|
3760
|
if (empty($webTemplateQuery)){
|
|
3718
|
- if ($type == WebTemplateCommon::$productCategoryName){
|
|
|
|
3719
|
- $templateTypeMain = WebTemplateMain::where("type",WebTemplateCommon::$product)->where("is_list",1)->where("is_custom",0)->first();
|
3761
|
+ if ($type == RouteMap::SOURCE_PRODUCT_CATE){
|
|
|
|
3762
|
+ $templateTypeMain = BTemplateMain::where("type",BTemplate::SOURCE_PRODUCT)->where("is_list",1)->where("is_custom",0)->first();
|
|
3720
|
if (empty($templateTypeMain)){
|
3763
|
if (empty($templateTypeMain)){
|
|
3721
|
- $param = ['type'=>WebTemplateCommon::$product,'is_list'=>1];
|
3764
|
+ $param = ['type'=>BTemplate::SOURCE_PRODUCT,'is_list'=>1];
|
|
3722
|
$templateTypeMain = TemplateTypeMain::where($param)->first();
|
3765
|
$templateTypeMain = TemplateTypeMain::where($param)->first();
|
|
3723
|
}
|
3766
|
}
|
|
3724
|
- }elseif ($type == WebTemplateCommon::$blogCategoryName){
|
|
|
|
3725
|
- $templateTypeMain = WebTemplateMain::where("type",WebTemplateCommon::$main_blog)->where("is_list",1)->where("is_custom",0)->first();
|
3767
|
+ }elseif ($type == RouteMap::SOURCE_BLOG_CATE){
|
|
|
|
3768
|
+ $templateTypeMain = BTemplateMain::where("type",BTemplate::SOURCE_BLOG)->where("is_list",1)->where("is_custom",0)->first();
|
|
3726
|
if (empty($templateTypeMain)){
|
3769
|
if (empty($templateTypeMain)){
|
|
3727
|
- $param = ['type'=>WebTemplateCommon::$main_blog,'is_list'=>1];
|
3770
|
+ $param = ['type'=>BTemplate::SOURCE_BLOG,'is_list'=>1];
|
|
3728
|
$templateTypeMain = TemplateTypeMain::where($param)->first();
|
3771
|
$templateTypeMain = TemplateTypeMain::where($param)->first();
|
|
3729
|
}
|
3772
|
}
|
|
3730
|
- }elseif ($type == WebTemplateCommon::$newsCategoryName){
|
|
|
|
3731
|
- $templateTypeMain = WebTemplateMain::where("type",WebTemplateCommon::$main_news)->where("is_list",1)->where("is_custom",0)->first();
|
3773
|
+ }elseif ($type == RouteMap::SOURCE_NEWS_CATE){
|
|
|
|
3774
|
+ $templateTypeMain = BTemplateMain::where("type",BTemplate::SOURCE_NEWS)->where("is_list",1)->where("is_custom",0)->first();
|
|
3732
|
if (empty($templateTypeMain)){
|
3775
|
if (empty($templateTypeMain)){
|
|
3733
|
- $param = ['type'=>WebTemplateCommon::$main_news,'is_list'=>1];
|
3776
|
+ $param = ['type'=>BTemplate::SOURCE_NEWS,'is_list'=>1];
|
|
3734
|
$templateTypeMain = TemplateTypeMain::where($param)->first();
|
3777
|
$templateTypeMain = TemplateTypeMain::where($param)->first();
|
|
3735
|
}
|
3778
|
}
|
|
3736
|
- }elseif ($type == WebTemplateCommon::$extendCategoryName){
|
|
|
|
3737
|
- $moduleCategoryInfo = ModuleCategory::getModuleCategoryAndExtendById($project->id,$routerMap->source_id);
|
3779
|
+ }elseif ($type == RouteMap::SOURCE_MODULE_CATE){
|
|
|
|
3780
|
+ $moduleCategoryInfo = CustomModuleCategory::getModuleCategoryAndExtendById($project->id,$routerMap->source_id);
|
|
3738
|
if (isset($moduleCategoryInfo->getExtend->id) && !empty($moduleCategoryInfo->getExtend->id)){
|
3781
|
if (isset($moduleCategoryInfo->getExtend->id) && !empty($moduleCategoryInfo->getExtend->id)){
|
|
3739
|
- $templateTypeMain = WebTemplateMain::where("type",$moduleCategoryInfo->getExtend->id)->where("is_custom",1)->where("is_list",1)->first();
|
3782
|
+ $templateTypeMain = BTemplateMain::where("type",$moduleCategoryInfo->getExtend->id)->where("is_custom",1)->where("is_list",1)->first();
|
|
3740
|
if (empty($templateTypeMain)){
|
3783
|
if (empty($templateTypeMain)){
|
|
3741
|
$param = ['type'=>7,'is_list'=>1];
|
3784
|
$param = ['type'=>7,'is_list'=>1];
|
|
3742
|
$templateTypeMain = TemplateTypeMain::where($param)->first();
|
3785
|
$templateTypeMain = TemplateTypeMain::where($param)->first();
|
|
@@ -3758,15 +3801,15 @@ class PageService{ |
|
@@ -3758,15 +3801,15 @@ class PageService{ |
|
3758
|
}
|
3801
|
}
|
|
3759
|
|
3802
|
|
|
3760
|
//当4种详情页没有装修的时候,则拿项目默认装修页
|
3803
|
//当4种详情页没有装修的时候,则拿项目默认装修页
|
|
3761
|
- if ($type == WebTemplateCommon::$productName || $type == WebTemplateCommon::$blogName || $type == WebTemplateCommon::$newsName || $type == WebTemplateCommon::$extendName){
|
|
|
|
3762
|
- $webTemplateMainQuery = WebTemplateMain::where("project_id",$project->id);
|
3804
|
+ if ($type == RouteMap::SOURCE_PRODUCT || $type == RouteMap::SOURCE_BLOG || $type == RouteMap::SOURCE_NEWS || $type == RouteMap::SOURCE_MODULE){
|
|
|
|
3805
|
+ $webTemplateMainQuery = BTemplateMain::where("project_id",$project->id);
|
|
3763
|
if (empty($webTemplateQuery)){
|
3806
|
if (empty($webTemplateQuery)){
|
|
3764
|
- if ($type == WebTemplateCommon::$productName){
|
|
|
|
3765
|
- $webTemplateMain = $webTemplateMainQuery->where("type",WebTemplateCommon::$product)->where("is_list",0)->first();
|
|
|
|
3766
|
- }elseif($type == WebTemplateCommon::$blogName){
|
|
|
|
3767
|
- $webTemplateMain = $webTemplateMainQuery->where("type",WebTemplateCommon::$main_blog)->where("is_list",0)->first();
|
|
|
|
3768
|
- }elseif($type == WebTemplateCommon::$extendName){
|
|
|
|
3769
|
- $moduleCategory = ModuleCategory::where("project_id",$project->id)->where("status",0)->where("id",$routerMap->source_id)->first();
|
3807
|
+ if ($type == RouteMap::SOURCE_PRODUCT){
|
|
|
|
3808
|
+ $webTemplateMain = $webTemplateMainQuery->where("type",BTemplate::SOURCE_PRODUCT)->where("is_list",0)->first();
|
|
|
|
3809
|
+ }elseif($type == RouteMap::SOURCE_BLOG){
|
|
|
|
3810
|
+ $webTemplateMain = $webTemplateMainQuery->where("type",BTemplate::SOURCE_BLOG)->where("is_list",0)->first();
|
|
|
|
3811
|
+ }elseif($type == RouteMap::SOURCE_MODULE){
|
|
|
|
3812
|
+ $moduleCategory = CustomModuleCategory::where("project_id",$project->id)->where("status",0)->where("id",$routerMap->source_id)->first();
|
|
3770
|
if (!empty($moduleCategory)) {
|
3813
|
if (!empty($moduleCategory)) {
|
|
3771
|
$moduleId = $moduleCategory->module_id;
|
3814
|
$moduleId = $moduleCategory->module_id;
|
|
3772
|
$webTemplateMain = $webTemplateMainQuery->where("type",$moduleId)->where("is_custom",1)->where("is_list",0)->first();
|
3815
|
$webTemplateMain = $webTemplateMainQuery->where("type",$moduleId)->where("is_custom",1)->where("is_list",0)->first();
|
|
@@ -3774,7 +3817,7 @@ class PageService{ |
|
@@ -3774,7 +3817,7 @@ class PageService{ |
|
3774
|
$webTemplateMain = null;
|
3817
|
$webTemplateMain = null;
|
|
3775
|
}
|
3818
|
}
|
|
3776
|
}else{
|
3819
|
}else{
|
|
3777
|
- $webTemplateMain = $webTemplateMainQuery->where("type",WebTemplateCommon::$main_news)->where("is_list",0)->first();
|
3820
|
+ $webTemplateMain = $webTemplateMainQuery->where("type",BTemplate::SOURCE_NEWS)->where("is_list",0)->first();
|
|
3778
|
}
|
3821
|
}
|
|
3779
|
if (!empty($webTemplateMain)){
|
3822
|
if (!empty($webTemplateMain)){
|
|
3780
|
$webTemplateQuery["main_html"] = "";
|
3823
|
$webTemplateQuery["main_html"] = "";
|
|
@@ -3784,16 +3827,16 @@ class PageService{ |
|
@@ -3784,16 +3827,16 @@ class PageService{ |
|
3784
|
$webTemplateQuery->main_css = $webTemplateMain->main_css;
|
3827
|
$webTemplateQuery->main_css = $webTemplateMain->main_css;
|
|
3785
|
}else{
|
3828
|
}else{
|
|
3786
|
//产品详情项目里也没有模板的时候,取原始模板
|
3829
|
//产品详情项目里也没有模板的时候,取原始模板
|
|
3787
|
- if ($type == WebTemplateCommon::$productName){
|
|
|
|
3788
|
- $templateTypeMain = TemplateTypeMain::where("type",WebTemplateCommon::$product)->where("is_list",0)->first();
|
|
|
|
3789
|
- }elseif($type == WebTemplateCommon::$blogName){
|
3830
|
+ if ($type == RouteMap::SOURCE_PRODUCT){
|
|
|
|
3831
|
+ $templateTypeMain = TemplateTypeMain::where("type",BTemplate::SOURCE_PRODUCT)->where("is_list",0)->first();
|
|
|
|
3832
|
+ }elseif($type == RouteMap::SOURCE_BLOG){
|
|
3790
|
// $templateTypeMain = TemplateTypeMain::where("type",WebTemplateCommon::$blog)->first();
|
3833
|
// $templateTypeMain = TemplateTypeMain::where("type",WebTemplateCommon::$blog)->first();
|
|
3791
|
- $templateTypeMain = TemplateTypeMain::where(['type'=>WebTemplateCommon::$main_blog,'is_list'=>0])->first();
|
|
|
|
3792
|
- }elseif($type == WebTemplateCommon::$extendName){
|
3834
|
+ $templateTypeMain = TemplateTypeMain::where(['type'=>BTemplate::SOURCE_BLOG,'is_list'=>0])->first();
|
|
|
|
3835
|
+ }elseif($type == RouteMap::SOURCE_MODULE){
|
|
3793
|
$templateTypeMain = TemplateTypeMain::where("type","7")->where("is_list",0)->first();
|
3836
|
$templateTypeMain = TemplateTypeMain::where("type","7")->where("is_list",0)->first();
|
|
3794
|
}else{
|
3837
|
}else{
|
|
3795
|
// $templateTypeMain = TemplateTypeMain::where("type",WebTemplateCommon::$news)->first();
|
3838
|
// $templateTypeMain = TemplateTypeMain::where("type",WebTemplateCommon::$news)->first();
|
|
3796
|
- $templateTypeMain = TemplateTypeMain::where(['type'=>WebTemplateCommon::$main_news,'is_list'=>0])->first();
|
3839
|
+ $templateTypeMain = TemplateTypeMain::where(['type'=>BTemplate::SOURCE_NEWS,'is_list'=>0])->first();
|
|
3797
|
}
|
3840
|
}
|
|
3798
|
if (!empty($templateTypeMain)){
|
3841
|
if (!empty($templateTypeMain)){
|
|
3799
|
$webTemplateQuery["main_html"] = "";
|
3842
|
$webTemplateQuery["main_html"] = "";
|
|
@@ -3824,76 +3867,76 @@ class PageService{ |
|
@@ -3824,76 +3867,76 @@ class PageService{ |
|
3824
|
*/
|
3867
|
*/
|
|
3825
|
public function getPageHeadDataByType($project,$projectPageSetting,$type,$templateInfo,$routerMap)
|
3868
|
public function getPageHeadDataByType($project,$projectPageSetting,$type,$templateInfo,$routerMap)
|
|
3826
|
{
|
3869
|
{
|
|
3827
|
- $webTemplateCommonQuery = WebTemplateCommon::where("project_id",$project->id)->where("template_id",$templateInfo->template_id);
|
3870
|
+ $webTemplateCommonQuery = BTemplateCommon::where("project_id",$project->id)->where("template_id",$templateInfo->template_id);
|
|
3828
|
switch ($type) {
|
3871
|
switch ($type) {
|
|
3829
|
- case WebTemplateCommon::$productName:
|
3872
|
+ case RouteMap::SOURCE_PRODUCT:
|
|
3830
|
if (!empty($projectPageSetting->product_details) || $projectPageSetting->product_details != 0){
|
3873
|
if (!empty($projectPageSetting->product_details) || $projectPageSetting->product_details != 0){
|
|
3831
|
- $webTemplateCommonQuery = $webTemplateCommonQuery->where("type",WebTemplateCommon::$product)->where("is_custom",0)->first();
|
3874
|
+ $webTemplateCommonQuery = $webTemplateCommonQuery->where("type",BTemplate::TYPE_PRODUCT_DETAIL)->where("is_custom",0)->first();
|
|
3832
|
}else{
|
3875
|
}else{
|
|
3833
|
return null;
|
3876
|
return null;
|
|
3834
|
}
|
3877
|
}
|
|
3835
|
break;
|
3878
|
break;
|
|
3836
|
- case WebTemplateCommon::$productCategoryName:
|
3879
|
+ case RouteMap::SOURCE_PRODUCT_CATE:
|
|
3837
|
if (!empty($projectPageSetting->product_list) || $projectPageSetting->product_list != 0){
|
3880
|
if (!empty($projectPageSetting->product_list) || $projectPageSetting->product_list != 0){
|
|
3838
|
- $webTemplateCommonQuery = $webTemplateCommonQuery->where("type",WebTemplateCommon::$productCategory)->where("is_custom",0)->first();
|
3881
|
+ $webTemplateCommonQuery = $webTemplateCommonQuery->where("type",BTemplate::TYPE_PRODUCT_LIST)->where("is_custom",0)->first();
|
|
3839
|
}else{
|
3882
|
}else{
|
|
3840
|
return null;
|
3883
|
return null;
|
|
3841
|
}
|
3884
|
}
|
|
3842
|
break;
|
3885
|
break;
|
|
3843
|
- case WebTemplateCommon::$blogName:
|
3886
|
+ case RouteMap::SOURCE_BLOG:
|
|
3844
|
if (!empty($projectPageSetting->blog_details) || $projectPageSetting->blog_details != 0){
|
3887
|
if (!empty($projectPageSetting->blog_details) || $projectPageSetting->blog_details != 0){
|
|
3845
|
- $webTemplateCommonQuery = $webTemplateCommonQuery->where("type",WebTemplateCommon::$blog)->where("is_custom",0)->first();
|
3888
|
+ $webTemplateCommonQuery = $webTemplateCommonQuery->where("type",BTemplate::TYPE_BLOG_DETAIL)->where("is_custom",0)->first();
|
|
3846
|
}else{
|
3889
|
}else{
|
|
3847
|
return null;
|
3890
|
return null;
|
|
3848
|
}
|
3891
|
}
|
|
3849
|
break;
|
3892
|
break;
|
|
3850
|
- case WebTemplateCommon::$blogCategoryName:
|
3893
|
+ case RouteMap::SOURCE_BLOG_CATE:
|
|
3851
|
if (!empty($projectPageSetting->blog_list) || $projectPageSetting->blog_list != 0){
|
3894
|
if (!empty($projectPageSetting->blog_list) || $projectPageSetting->blog_list != 0){
|
|
3852
|
- $webTemplateCommonQuery = $webTemplateCommonQuery->where("type",WebTemplateCommon::$blogCategory)->where("is_custom",0)->first();
|
3895
|
+ $webTemplateCommonQuery = $webTemplateCommonQuery->where("type",BTemplate::TYPE_BLOG_LIST)->where("is_custom",0)->first();
|
|
3853
|
}else{
|
3896
|
}else{
|
|
3854
|
return null;
|
3897
|
return null;
|
|
3855
|
}
|
3898
|
}
|
|
3856
|
break;
|
3899
|
break;
|
|
3857
|
- case WebTemplateCommon::$newsName:
|
3900
|
+ case RouteMap::SOURCE_NEWS:
|
|
3858
|
if (!empty($projectPageSetting->news_details) || $projectPageSetting->news_details != 0){
|
3901
|
if (!empty($projectPageSetting->news_details) || $projectPageSetting->news_details != 0){
|
|
3859
|
- $webTemplateCommonQuery = $webTemplateCommonQuery->where("type",WebTemplateCommon::$news)->where("is_custom",0)->first();
|
3902
|
+ $webTemplateCommonQuery = $webTemplateCommonQuery->where("type",BTemplate::TYPE_NEWS_DETAIL)->where("is_custom",0)->first();
|
|
3860
|
}else{
|
3903
|
}else{
|
|
3861
|
return null;
|
3904
|
return null;
|
|
3862
|
}
|
3905
|
}
|
|
3863
|
break;
|
3906
|
break;
|
|
3864
|
- case WebTemplateCommon::$newsCategoryName:
|
3907
|
+ case RouteMap::SOURCE_NEWS_CATE:
|
|
3865
|
if (!empty($projectPageSetting->news_list) || $projectPageSetting->news_list != 0){
|
3908
|
if (!empty($projectPageSetting->news_list) || $projectPageSetting->news_list != 0){
|
|
3866
|
- $webTemplateCommonQuery = $webTemplateCommonQuery->where("type",WebTemplateCommon::$newsCategory)->where("is_custom",0)->first();
|
3909
|
+ $webTemplateCommonQuery = $webTemplateCommonQuery->where("type",BTemplate::TYPE_NEWS_LIST)->where("is_custom",0)->first();
|
|
3867
|
}else{
|
3910
|
}else{
|
|
3868
|
return null;
|
3911
|
return null;
|
|
3869
|
}
|
3912
|
}
|
|
3870
|
break;
|
3913
|
break;
|
|
3871
|
- case WebTemplateCommon::$productKeywordName:
|
3914
|
+ case RouteMap::SOURCE_PRODUCT_KEYWORD:
|
|
3872
|
if (!empty($projectPageSetting->polymerization) || $projectPageSetting->polymerization != 0){
|
3915
|
if (!empty($projectPageSetting->polymerization) || $projectPageSetting->polymerization != 0){
|
|
3873
|
- $webTemplateCommonQuery = $webTemplateCommonQuery->where("type",WebTemplateCommon::$productKeyword)->where("is_custom",0)->first();
|
3916
|
+ $webTemplateCommonQuery = $webTemplateCommonQuery->where("type",BTemplate::TYPE_HOME)->where("is_custom",0)->first();
|
|
3874
|
}else{
|
3917
|
}else{
|
|
3875
|
return null;
|
3918
|
return null;
|
|
3876
|
}
|
3919
|
}
|
|
3877
|
break;
|
3920
|
break;
|
|
3878
|
- case WebTemplateCommon::$pageName:
|
3921
|
+ case RouteMap::SOURCE_PAGE:
|
|
3879
|
if (!empty($projectPageSetting->page_list) || $projectPageSetting->page_list != 0){
|
3922
|
if (!empty($projectPageSetting->page_list) || $projectPageSetting->page_list != 0){
|
|
3880
|
- $webTemplateCommonQuery = $webTemplateCommonQuery->where("type",WebTemplateCommon::$page)->where("is_custom",0)->first();
|
3923
|
+ $webTemplateCommonQuery = $webTemplateCommonQuery->where("type",BTemplate::TYPE_CUSTOM_PAGE)->where("is_custom",0)->first();
|
|
3881
|
}else{
|
3924
|
}else{
|
|
3882
|
return null;
|
3925
|
return null;
|
|
3883
|
}
|
3926
|
}
|
|
3884
|
break;
|
3927
|
break;
|
|
3885
|
- case WebTemplateCommon::$extendCategoryName:
|
|
|
|
3886
|
- $moduleCategoryInfo = ModuleCategory::getModuleCategoryAndExtendById($project->id,$routerMap->source_id);
|
3928
|
+ case RouteMap::SOURCE_MODULE_CATE:
|
|
|
|
3929
|
+ $moduleCategoryInfo = CustomModuleCategory::getModuleCategoryAndExtendById($project->id,$routerMap->source_id);
|
|
3887
|
if (isset($moduleCategoryInfo->getExtend->list_customized) && $moduleCategoryInfo->getExtend->list_customized == 1){
|
3930
|
if (isset($moduleCategoryInfo->getExtend->list_customized) && $moduleCategoryInfo->getExtend->list_customized == 1){
|
|
3888
|
$webTemplateCommonQuery = $webTemplateCommonQuery->where("type",$routerMap->source_id)->where("is_custom",1)->where("is_list",1)->first();
|
3931
|
$webTemplateCommonQuery = $webTemplateCommonQuery->where("type",$routerMap->source_id)->where("is_custom",1)->where("is_list",1)->first();
|
|
3889
|
}else{
|
3932
|
}else{
|
|
3890
|
return null;
|
3933
|
return null;
|
|
3891
|
}
|
3934
|
}
|
|
3892
|
break;
|
3935
|
break;
|
|
3893
|
- case WebTemplateCommon::$extendName:
|
|
|
|
3894
|
- $modules = Module::where("project_id",$project->id)->where("status",0)->where("id",$routerMap->source_id)->first();
|
3936
|
+ case RouteMap::SOURCE_MODULE:
|
|
|
|
3937
|
+ $modules = CustomModuleContent::where("project_id",$project->id)->where("status",0)->where("id",$routerMap->source_id)->first();
|
|
3895
|
if (!empty($modules)){
|
3938
|
if (!empty($modules)){
|
|
3896
|
- $moduleCategoryInfo = Module::getModuleCategory($project->id,$modules);
|
3939
|
+ $moduleCategoryInfo = CustomModuleContent::getModuleCategory($project->id,$modules);
|
|
3897
|
if (isset($moduleCategoryInfo->getExtend->detail_customized) && $moduleCategoryInfo->getExtend->detail_customized == 1){
|
3940
|
if (isset($moduleCategoryInfo->getExtend->detail_customized) && $moduleCategoryInfo->getExtend->detail_customized == 1){
|
|
3898
|
$webTemplateCommonQuery = $webTemplateCommonQuery->where("type",$routerMap->source_id)->where("is_custom",1)->where("is_list",0)->first();
|
3941
|
$webTemplateCommonQuery = $webTemplateCommonQuery->where("type",$routerMap->source_id)->where("is_custom",1)->where("is_list",0)->first();
|
|
3899
|
}else{
|
3942
|
}else{
|
|
@@ -4075,8 +4118,8 @@ class PageService{ |
|
@@ -4075,8 +4118,8 @@ class PageService{ |
|
4075
|
public function mbNavModule($project,$routerMap): array
|
4118
|
public function mbNavModule($project,$routerMap): array
|
|
4076
|
{
|
4119
|
{
|
|
4077
|
$data = [];
|
4120
|
$data = [];
|
|
4078
|
- $modules = Module::where("project_id",$project->id)->where("route",$routerMap->route)->where("status",0)->first();
|
|
|
|
4079
|
- $moduleCategoryInfo = Module::getModuleCategory($project->id,$modules);
|
4121
|
+ $modules = CustomModuleContent::where("project_id",$project->id)->where("route",$routerMap->route)->where("status",0)->first();
|
|
|
|
4122
|
+ $moduleCategoryInfo = CustomModuleContent::getModuleCategory($project->id,$modules);
|
|
4080
|
if(!empty($moduleCategoryInfo)){
|
4123
|
if(!empty($moduleCategoryInfo)){
|
|
4081
|
$data[1]["mb_title"] = $moduleCategoryInfo->name;
|
4124
|
$data[1]["mb_title"] = $moduleCategoryInfo->name;
|
|
4082
|
if (isset($project->update_info["is_update"]) && $project->update_info["is_update"] == 1){
|
4125
|
if (isset($project->update_info["is_update"]) && $project->update_info["is_update"] == 1){
|
|
@@ -4225,7 +4268,7 @@ class PageService{ |
|
@@ -4225,7 +4268,7 @@ class PageService{ |
|
4225
|
{
|
4268
|
{
|
|
4226
|
$data = [];
|
4269
|
$data = [];
|
|
4227
|
$listRoute = "";
|
4270
|
$listRoute = "";
|
|
4228
|
- $extendCategory = ModuleCategory::getModuleCategoryAndExtendByRoute($project->id,$routerMap->route);
|
4271
|
+ $extendCategory = CustomModuleCategory::getModuleCategoryAndExtendByRoute($project->id,$routerMap->route);
|
|
4229
|
if (!empty($extendCategory)){
|
4272
|
if (!empty($extendCategory)){
|
|
4230
|
$data[0]["mb_title"] = $extendCategory->name;
|
4273
|
$data[0]["mb_title"] = $extendCategory->name;
|
|
4231
|
if (isset($project->update_info["is_update"]) && $project->update_info["is_update"] == 1){
|
4274
|
if (isset($project->update_info["is_update"]) && $project->update_info["is_update"] == 1){
|
|
@@ -4253,28 +4296,28 @@ class PageService{ |
|
@@ -4253,28 +4296,28 @@ class PageService{ |
|
4253
|
public function mbNavHandle($project,$type,$routerMap,$phpQueryDom)
|
4296
|
public function mbNavHandle($project,$type,$routerMap,$phpQueryDom)
|
|
4254
|
{
|
4297
|
{
|
|
4255
|
$data = [];
|
4298
|
$data = [];
|
|
4256
|
- if ($type == WebTemplateCommon::$newsCategoryName){
|
4299
|
+ if ($type == RouteMap::SOURCE_NEWS_CATE){
|
|
4257
|
//新闻分类
|
4300
|
//新闻分类
|
|
4258
|
$data = $this->mbNavNewsCategory($project,$routerMap);
|
4301
|
$data = $this->mbNavNewsCategory($project,$routerMap);
|
|
4259
|
- }elseif ($type == WebTemplateCommon::$blogCategoryName){
|
4302
|
+ }elseif ($type == RouteMap::SOURCE_BLOG_CATE){
|
|
4260
|
//博客分类
|
4303
|
//博客分类
|
|
4261
|
$data = $this->mbNavBlogCategory($project,$routerMap);
|
4304
|
$data = $this->mbNavBlogCategory($project,$routerMap);
|
|
4262
|
- }elseif ($type == WebTemplateCommon::$extendCategoryName){
|
4305
|
+ }elseif ($type == RouteMap::SOURCE_MODULE_CATE){
|
|
4263
|
//自定义模块分类
|
4306
|
//自定义模块分类
|
|
4264
|
$data = $this->mbNavExtendCategory($project,$routerMap);
|
4307
|
$data = $this->mbNavExtendCategory($project,$routerMap);
|
|
4265
|
- }elseif ($type == WebTemplateCommon::$productCategoryName){
|
4308
|
+ }elseif ($type == RouteMap::SOURCE_PRODUCT_CATE){
|
|
4266
|
//产品分类
|
4309
|
//产品分类
|
|
4267
|
$data = $this->mbNavProductsCategory($project,$routerMap);
|
4310
|
$data = $this->mbNavProductsCategory($project,$routerMap);
|
|
4268
|
- }elseif ($type == WebTemplateCommon::$newsName){
|
4311
|
+ }elseif ($type == RouteMap::SOURCE_NEWS){
|
|
4269
|
//新闻
|
4312
|
//新闻
|
|
4270
|
$data = $this->mbNavNews($project,$routerMap);
|
4313
|
$data = $this->mbNavNews($project,$routerMap);
|
|
4271
|
- }elseif ($type == WebTemplateCommon::$extendName){
|
4314
|
+ }elseif ($type == RouteMap::SOURCE_MODULE){
|
|
4272
|
//自定义模块详情
|
4315
|
//自定义模块详情
|
|
4273
|
$data = $this->mbNavModule($project,$routerMap);
|
4316
|
$data = $this->mbNavModule($project,$routerMap);
|
|
4274
|
- }elseif ($type == WebTemplateCommon::$blogName){
|
4317
|
+ }elseif ($type == RouteMap::SOURCE_BLOG){
|
|
4275
|
//博客
|
4318
|
//博客
|
|
4276
|
$data = $this->mbNaBlog($project,$routerMap);
|
4319
|
$data = $this->mbNaBlog($project,$routerMap);
|
|
4277
|
- }elseif ($type == WebTemplateCommon::$productName){
|
4320
|
+ }elseif ($type == RouteMap::SOURCE_PRODUCT){
|
|
4278
|
//产品
|
4321
|
//产品
|
|
4279
|
$data = $this->mbNaProducts($project,$routerMap);
|
4322
|
$data = $this->mbNaProducts($project,$routerMap);
|
|
4280
|
}else{
|
4323
|
}else{
|
|
@@ -4313,7 +4356,7 @@ class PageService{ |
|
@@ -4313,7 +4356,7 @@ class PageService{ |
|
4313
|
}
|
4356
|
}
|
|
4314
|
|
4357
|
|
|
4315
|
//详情页把分类的路由丢currentCategoryRoute
|
4358
|
//详情页把分类的路由丢currentCategoryRoute
|
|
4316
|
- if ($type == WebTemplateCommon::$productName || $type == WebTemplateCommon::$newsName || $type == WebTemplateCommon::$blogName || $type == WebTemplateCommon::$extendName){
|
4359
|
+ if ($type == RouteMap::SOURCE_PRODUCT || $type == RouteMap::SOURCE_NEWS || $type == RouteMap::SOURCE_BLOG || $type == RouteMap::SOURCE_MODULE){
|
|
4317
|
if (isset($data[1]["mb_route"]) && !empty($data[1]["mb_route"])){
|
4360
|
if (isset($data[1]["mb_route"]) && !empty($data[1]["mb_route"])){
|
|
4318
|
$phpQueryDom->find('head')->append('<script>var currentCategoryRoute = "'.$data[1]["mb_route"].'"</script>');
|
4361
|
$phpQueryDom->find('head')->append('<script>var currentCategoryRoute = "'.$data[1]["mb_route"].'"</script>');
|
|
4319
|
$phpQueryDom->find('head')->append('<script>var currentPage = "'.$data[1]["mb_route"].'"</script>');
|
4362
|
$phpQueryDom->find('head')->append('<script>var currentPage = "'.$data[1]["mb_route"].'"</script>');
|
|
@@ -4342,21 +4385,21 @@ class PageService{ |
|
@@ -4342,21 +4385,21 @@ class PageService{ |
|
4342
|
$innerBannerDataSource = $innerBannerModule->find("img")->attr("data-source");
|
4385
|
$innerBannerDataSource = $innerBannerModule->find("img")->attr("data-source");
|
|
4343
|
if (count($innerBannerModule) >= 1){
|
4386
|
if (count($innerBannerModule) >= 1){
|
|
4344
|
if ($innerBannerDataSource != "custom"){
|
4387
|
if ($innerBannerDataSource != "custom"){
|
|
4345
|
- if ($type == WebTemplateCommon::$productCategoryName || $type == WebTemplateCommon::$productName){
|
4388
|
+ if ($type == RouteMap::SOURCE_PRODUCT_CATE || $type == RouteMap::SOURCE_PRODUCT){
|
|
4346
|
if (isset($innerPageBanner->product_banner) && !empty($innerPageBanner->product_banner)){
|
4389
|
if (isset($innerPageBanner->product_banner) && !empty($innerPageBanner->product_banner)){
|
|
4347
|
$innerBannerModule->find(".page-banner")->attr("src",$this->getImageUrl($innerPageBanner->product_banner));
|
4390
|
$innerBannerModule->find(".page-banner")->attr("src",$this->getImageUrl($innerPageBanner->product_banner));
|
|
4348
|
}else{
|
4391
|
}else{
|
|
4349
|
$innerBannerModule->remove();
|
4392
|
$innerBannerModule->remove();
|
|
4350
|
}
|
4393
|
}
|
|
4351
|
}
|
4394
|
}
|
|
4352
|
- if ($type == WebTemplateCommon::$newsCategoryName || $type == WebTemplateCommon::$newsName || $type == WebTemplateCommon::$extendCategoryName || $type == WebTemplateCommon::$extendName){
|
4395
|
+ if ($type == RouteMap::SOURCE_NEWS_CATE || $type == RouteMap::SOURCE_NEWS || $type == RouteMap::SOURCE_MODULE_CATE || $type == RouteMap::SOURCE_MODULE){
|
|
4353
|
if (isset($innerPageBanner->news_banner) && !empty($innerPageBanner->news_banner)){
|
4396
|
if (isset($innerPageBanner->news_banner) && !empty($innerPageBanner->news_banner)){
|
|
4354
|
$innerBannerModule->find(".page-banner")->attr("src",$this->getImageUrl($innerPageBanner->news_banner));
|
4397
|
$innerBannerModule->find(".page-banner")->attr("src",$this->getImageUrl($innerPageBanner->news_banner));
|
|
4355
|
}else{
|
4398
|
}else{
|
|
4356
|
$innerBannerModule->remove();
|
4399
|
$innerBannerModule->remove();
|
|
4357
|
}
|
4400
|
}
|
|
4358
|
}
|
4401
|
}
|
|
4359
|
- if ($type == WebTemplateCommon::$blogCategoryName || $type == WebTemplateCommon::$blogName){
|
4402
|
+ if ($type == RouteMap::SOURCE_BLOG_CATE || $type == RouteMap::SOURCE_BLOG){
|
|
4360
|
if (isset($innerPageBanner->blog_banner) && !empty($innerPageBanner->blog_banner)){
|
4403
|
if (isset($innerPageBanner->blog_banner) && !empty($innerPageBanner->blog_banner)){
|
|
4361
|
$innerBannerModule->find(".page-banner")->attr("src",$this->getImageUrl($innerPageBanner->blog_banner));
|
4404
|
$innerBannerModule->find(".page-banner")->attr("src",$this->getImageUrl($innerPageBanner->blog_banner));
|
|
4362
|
}else{
|
4405
|
}else{
|
|
@@ -4366,7 +4409,7 @@ class PageService{ |
|
@@ -4366,7 +4409,7 @@ class PageService{ |
|
4366
|
}
|
4409
|
}
|
|
4367
|
|
4410
|
|
|
4368
|
if (!empty($data)){
|
4411
|
if (!empty($data)){
|
|
4369
|
- if ($type == WebTemplateCommon::$productName || $type == WebTemplateCommon::$newsName || $type == WebTemplateCommon::$blogName || $type == WebTemplateCommon::$extendName){
|
4412
|
+ if ($type == RouteMap::SOURCE_PRODUCT || $type == RouteMap::SOURCE_NEWS || $type == RouteMap::SOURCE_BLOG || $type == RouteMap::SOURCE_MODULE){
|
|
4370
|
if (isset($data[1]["mb_title"]) && !empty($data[1]["mb_title"])){
|
4413
|
if (isset($data[1]["mb_title"]) && !empty($data[1]["mb_title"])){
|
|
4371
|
$innerBannerModule->find(".page-title")->replaceWith('<h2 class="page-title">'.$data[1]["mb_title"].'</h2>');
|
4414
|
$innerBannerModule->find(".page-title")->replaceWith('<h2 class="page-title">'.$data[1]["mb_title"].'</h2>');
|
|
4372
|
}
|
4415
|
}
|
|
@@ -4398,15 +4441,15 @@ class PageService{ |
|
@@ -4398,15 +4441,15 @@ class PageService{ |
|
4398
|
$dataNavModule = $leftNavModule->attr("data-module");
|
4441
|
$dataNavModule = $leftNavModule->attr("data-module");
|
|
4399
|
if ($dataNavModule != null){
|
4442
|
if ($dataNavModule != null){
|
|
4400
|
if ($dataNavType == null || $dataNavType == "" || $dataNavType == "default") {
|
4443
|
if ($dataNavType == null || $dataNavType == "" || $dataNavType == "default") {
|
|
4401
|
- if ($type == WebTemplateCommon::$productCategoryName || $type == WebTemplateCommon::$productName){
|
4444
|
+ if ($type == RouteMap::SOURCE_PRODUCT_CATE || $type == RouteMap::SOURCE_PRODUCT){
|
|
4402
|
//产品分类块
|
4445
|
//产品分类块
|
|
4403
|
$this->productsLeftNavHandle($project,$leftNavModule);
|
4446
|
$this->productsLeftNavHandle($project,$leftNavModule);
|
|
4404
|
- }elseif($type == WebTemplateCommon::$extendCategoryName || $type == WebTemplateCommon::$extendName){
|
4447
|
+ }elseif($type == RouteMap::SOURCE_MODULE_CATE || $type == RouteMap::SOURCE_MODULE){
|
|
4405
|
//自定义模块分类
|
4448
|
//自定义模块分类
|
|
4406
|
$this->moduleLeftNavHandle($project,$leftNavModule,$type,$routerMap);
|
4449
|
$this->moduleLeftNavHandle($project,$leftNavModule,$type,$routerMap);
|
|
4407
|
}else{
|
4450
|
}else{
|
|
4408
|
//新闻博客分类块
|
4451
|
//新闻博客分类块
|
|
4409
|
- if (in_array($type,[WebTemplateCommon::$newsCategoryName,WebTemplateCommon::$newsName,WebTemplateCommon::$blogCategoryName,WebTemplateCommon::$blogName])){
|
4452
|
+ if (in_array($type,[RouteMap::SOURCE_NEWS_CATE,RouteMap::SOURCE_NEWS,RouteMap::SOURCE_BLOG_CATE,RouteMap::SOURCE_BLOG])){
|
|
4410
|
$this->newsAndBlogLeftNavHandle($project,$type,$leftNavModule);
|
4453
|
$this->newsAndBlogLeftNavHandle($project,$type,$leftNavModule);
|
|
4411
|
}
|
4454
|
}
|
|
4412
|
}
|
4455
|
}
|
|
@@ -4423,13 +4466,7 @@ class PageService{ |
|
@@ -4423,13 +4466,7 @@ class PageService{ |
|
4423
|
*/
|
4466
|
*/
|
|
4424
|
public function menuLeftNavHandle($project,$dataNavType,$leftNavModule)
|
4467
|
public function menuLeftNavHandle($project,$dataNavType,$leftNavModule)
|
|
4425
|
{
|
4468
|
{
|
|
4426
|
-// $flattenedArray = WebNavGroup::getNavGroupSortListByID($project->id,(int)$dataNavType);
|
|
|
|
4427
|
-// if (!empty($flattenedArray)){
|
|
|
|
4428
|
-// $sideBarNav = WebNav::where("project_id",$project->id)->whereIn('id', $flattenedArray)->orderByRaw(DB::raw("FIELD(id, " . implode(",", $flattenedArray) . ")"))->where("status",1)->get();
|
|
|
|
4429
|
-// }else{
|
|
|
|
4430
|
-// $sideBarNav = WebNav::where("project_id",$project->id)->where("group_id",(int)$dataNavType)->orderBy("sort","desc")->orderBy("id","desc")->where("status",1)->get();
|
|
|
|
4431
|
-// }
|
|
|
|
4432
|
- $sideBarNav = WebNav::where("project_id",$project->id)->where("group_id",(int)$dataNavType)->orderBy("sort","asc")->orderBy("id","asc")->where("status",1)->get();
|
4469
|
+ $sideBarNav = BNav::where("project_id",$project->id)->where("group_id",(int)$dataNavType)->orderBy("sort","asc")->orderBy("id","asc")->where("status",1)->get();
|
|
4433
|
if (!empty($sideBarNav)) {
|
4470
|
if (!empty($sideBarNav)) {
|
|
4434
|
$siteNav = $this->tree($sideBarNav->toArray());
|
4471
|
$siteNav = $this->tree($sideBarNav->toArray());
|
|
4435
|
$block = "";
|
4472
|
$block = "";
|
|
@@ -4449,7 +4486,7 @@ class PageService{ |
|
@@ -4449,7 +4486,7 @@ class PageService{ |
|
4449
|
*/
|
4486
|
*/
|
|
4450
|
public function newsAndBlogLeftNavHandle($project,$type,$leftNavModule)
|
4487
|
public function newsAndBlogLeftNavHandle($project,$type,$leftNavModule)
|
|
4451
|
{
|
4488
|
{
|
|
4452
|
- if ($type == WebTemplateCommon::$newsCategoryName || $type == WebTemplateCommon::$newsName){
|
4489
|
+ if ($type == RouteMap::SOURCE_NEWS_CATE || $type == RouteMap::SOURCE_NEWS){
|
|
4453
|
$newsAndBlogCategory = NewsCategory::where("project_id",$project->id)->where("status",0)->orderBy("sort","desc")->orderBy("id","desc")->get();
|
4490
|
$newsAndBlogCategory = NewsCategory::where("project_id",$project->id)->where("status",0)->orderBy("sort","desc")->orderBy("id","desc")->get();
|
|
4454
|
}else{
|
4491
|
}else{
|
|
4455
|
$newsAndBlogCategory = BlogCategory::where("project_id",$project->id)->where("status",0)->orderBy("sort","desc")->orderBy("id","desc")->get();
|
4492
|
$newsAndBlogCategory = BlogCategory::where("project_id",$project->id)->where("status",0)->orderBy("sort","desc")->orderBy("id","desc")->get();
|
|
@@ -4460,9 +4497,9 @@ class PageService{ |
|
@@ -4460,9 +4497,9 @@ class PageService{ |
|
4460
|
$block = "";
|
4497
|
$block = "";
|
|
4461
|
foreach ($sideBarNav as $nav){
|
4498
|
foreach ($sideBarNav as $nav){
|
|
4462
|
if (isset($nav['_child']) && !empty($nav['_child'])){
|
4499
|
if (isset($nav['_child']) && !empty($nav['_child'])){
|
|
4463
|
- $block.=$this->moreLeftNavHandle($project,$nav,WebTemplateCommon::$newsCategoryName);
|
4500
|
+ $block.=$this->moreLeftNavHandle($project,$nav,RouteMap::SOURCE_NEWS_CATE);
|
|
4464
|
}else{
|
4501
|
}else{
|
|
4465
|
- $block.=$this->singLeftNavHandle($project,$nav,WebTemplateCommon::$newsCategoryName);
|
4502
|
+ $block.=$this->singLeftNavHandle($project,$nav,RouteMap::SOURCE_NEWS_CATE);
|
|
4466
|
}
|
4503
|
}
|
|
4467
|
}
|
4504
|
}
|
|
4468
|
$leftNavModule->html($block);
|
4505
|
$leftNavModule->html($block);
|
|
@@ -4475,23 +4512,23 @@ class PageService{ |
|
@@ -4475,23 +4512,23 @@ class PageService{ |
|
4475
|
*/
|
4512
|
*/
|
|
4476
|
public function moduleLeftNavHandle($project,$leftNavModule,$type,$routerMap)
|
4513
|
public function moduleLeftNavHandle($project,$leftNavModule,$type,$routerMap)
|
|
4477
|
{
|
4514
|
{
|
|
4478
|
- if ($type == WebTemplateCommon::$extendCategoryName){
|
|
|
|
4479
|
- $moduleCategoryInfo = ModuleCategory::getModuleCategoryAndExtendByRoute($project->id,$routerMap->route);
|
4515
|
+ if ($type == RouteMap::SOURCE_MODULE_CATE){
|
|
|
|
4516
|
+ $moduleCategoryInfo = CustomModuleCategory::getModuleCategoryAndExtendByRoute($project->id,$routerMap->route);
|
|
4480
|
}else{
|
4517
|
}else{
|
|
4481
|
- $modules = Module::where("project_id",$project->id)->where("route",$routerMap->route)->where("status",0)->first();
|
|
|
|
4482
|
- $moduleCategoryInfo = Module::getModuleCategory($project->id,$modules);
|
4518
|
+ $modules = CustomModuleContent::where("project_id",$project->id)->where("route",$routerMap->route)->where("status",0)->first();
|
|
|
|
4519
|
+ $moduleCategoryInfo = CustomModuleContent::getModuleCategory($project->id,$modules);
|
|
4483
|
}
|
4520
|
}
|
|
4484
|
if (!empty($moduleCategoryInfo)){
|
4521
|
if (!empty($moduleCategoryInfo)){
|
|
4485
|
- $categoryList = ModuleCategory::where("project_id",$project->id)->where("module_id",(int)$moduleCategoryInfo->module_id)->where("status",0)->get();
|
4522
|
+ $categoryList = CustomModuleCategory::where("project_id",$project->id)->where("module_id",(int)$moduleCategoryInfo->module_id)->where("status",0)->get();
|
|
4486
|
if (!empty($categoryList)){
|
4523
|
if (!empty($categoryList)){
|
|
4487
|
$sideBarNav = $this->tree($categoryList->toArray());
|
4524
|
$sideBarNav = $this->tree($categoryList->toArray());
|
|
4488
|
if (!empty($sideBarNav)){
|
4525
|
if (!empty($sideBarNav)){
|
|
4489
|
$block = "";
|
4526
|
$block = "";
|
|
4490
|
foreach ($sideBarNav as $nav){
|
4527
|
foreach ($sideBarNav as $nav){
|
|
4491
|
if (isset($nav['_child']) && !empty($nav['_child'])){
|
4528
|
if (isset($nav['_child']) && !empty($nav['_child'])){
|
|
4492
|
- $block.=$this->moreLeftNavHandle($project,$nav,WebTemplateCommon::$extendCategoryName,$moduleCategoryInfo);
|
4529
|
+ $block.=$this->moreLeftNavHandle($project,$nav,RouteMap::SOURCE_MODULE_CATE,$moduleCategoryInfo);
|
|
4493
|
}else{
|
4530
|
}else{
|
|
4494
|
- $block.=$this->singLeftNavHandle($project,$nav,WebTemplateCommon::$extendCategoryName,$moduleCategoryInfo);
|
4531
|
+ $block.=$this->singLeftNavHandle($project,$nav,RouteMap::SOURCE_MODULE_CATE,$moduleCategoryInfo);
|
|
4495
|
}
|
4532
|
}
|
|
4496
|
}
|
4533
|
}
|
|
4497
|
$leftNavModule->html($block);
|
4534
|
$leftNavModule->html($block);
|
|
@@ -4512,9 +4549,9 @@ class PageService{ |
|
@@ -4512,9 +4549,9 @@ class PageService{ |
|
4512
|
$block = "";
|
4549
|
$block = "";
|
|
4513
|
foreach ($sideBarNav as $nav){
|
4550
|
foreach ($sideBarNav as $nav){
|
|
4514
|
if (isset($nav['_child']) && !empty($nav['_child'])){
|
4551
|
if (isset($nav['_child']) && !empty($nav['_child'])){
|
|
4515
|
- $block.=$this->moreLeftNavHandle($project,$nav,WebTemplateCommon::$productCategoryName);
|
4552
|
+ $block.=$this->moreLeftNavHandle($project,$nav,RouteMap::SOURCE_PRODUCT_CATE);
|
|
4516
|
}else{
|
4553
|
}else{
|
|
4517
|
- $block.=$this->singLeftNavHandle($project,$nav,WebTemplateCommon::$productCategoryName);
|
4554
|
+ $block.=$this->singLeftNavHandle($project,$nav,RouteMap::SOURCE_PRODUCT_CATE);
|
|
4518
|
}
|
4555
|
}
|
|
4519
|
}
|
4556
|
}
|
|
4520
|
$leftNavModule->html($block);
|
4557
|
$leftNavModule->html($block);
|
|
@@ -4530,15 +4567,15 @@ class PageService{ |
|
@@ -4530,15 +4567,15 @@ class PageService{ |
|
4530
|
//是否是5.0升级项目
|
4567
|
//是否是5.0升级项目
|
|
4531
|
if (isset($project->update_info["is_update"]) && $project->update_info["is_update"] == 1){
|
4568
|
if (isset($project->update_info["is_update"]) && $project->update_info["is_update"] == 1){
|
|
4532
|
//5.0列表分页
|
4569
|
//5.0列表分页
|
|
4533
|
- if ($type == WebTemplateCommon::$productCategoryName){
|
4570
|
+ if ($type == RouteMap::SOURCE_PRODUCT_CATE){
|
|
4534
|
$listRoute = $page == null || $page == 1 ? $routerMap->route : $routerMap->route."/page";
|
4571
|
$listRoute = $page == null || $page == 1 ? $routerMap->route : $routerMap->route."/page";
|
|
4535
|
- }elseif ($type == WebTemplateCommon::$blogCategoryName){
|
4572
|
+ }elseif ($type == RouteMap::SOURCE_BLOG_CATE){
|
|
4536
|
if ($routerMap->route == "blog"){
|
4573
|
if ($routerMap->route == "blog"){
|
|
4537
|
$listRoute = $page == null || $page == 1 ? $routerMap->route: $routerMap->route."/page";
|
4574
|
$listRoute = $page == null || $page == 1 ? $routerMap->route: $routerMap->route."/page";
|
|
4538
|
}else{
|
4575
|
}else{
|
|
4539
|
$listRoute = $page == null || $page == 1 ? "blog_catalog/".$routerMap->route: "blog_catalog/".$routerMap->route."/page";
|
4576
|
$listRoute = $page == null || $page == 1 ? "blog_catalog/".$routerMap->route: "blog_catalog/".$routerMap->route."/page";
|
|
4540
|
}
|
4577
|
}
|
|
4541
|
- }elseif ($type == WebTemplateCommon::$newsCategoryName){
|
4578
|
+ }elseif ($type == RouteMap::SOURCE_NEWS_CATE){
|
|
4542
|
if ($routerMap->source_id == 0){
|
4579
|
if ($routerMap->source_id == 0){
|
|
4543
|
$listRoute = $routerMap->route;
|
4580
|
$listRoute = $routerMap->route;
|
|
4544
|
}else{
|
4581
|
}else{
|
|
@@ -4548,8 +4585,8 @@ class PageService{ |
|
@@ -4548,8 +4585,8 @@ class PageService{ |
|
4548
|
$listRoute = $page == null || $page == 1 ? "news_catalog/".$routerMap->route : "news_catalog/".$routerMap->route."/page";
|
4585
|
$listRoute = $page == null || $page == 1 ? "news_catalog/".$routerMap->route : "news_catalog/".$routerMap->route."/page";
|
|
4549
|
}
|
4586
|
}
|
|
4550
|
}
|
4587
|
}
|
|
4551
|
- }elseif ($type == WebTemplateCommon::$extendCategoryName){
|
|
|
|
4552
|
- $moduleCategoryInfo = ModuleCategory::getModuleCategoryAndExtendByRoute($project->id,$routerMap->route);
|
4588
|
+ }elseif ($type == RouteMap::SOURCE_MODULE_CATE){
|
|
|
|
4589
|
+ $moduleCategoryInfo = CustomModuleCategory::getModuleCategoryAndExtendByRoute($project->id,$routerMap->route);
|
|
4553
|
if (isset($moduleCategoryInfo->getExtend->route) && !empty($moduleCategoryInfo->getExtend->route)){
|
4590
|
if (isset($moduleCategoryInfo->getExtend->route) && !empty($moduleCategoryInfo->getExtend->route)){
|
|
4554
|
if ($moduleCategoryInfo->getExtend->route == $routerMap->route){
|
4591
|
if ($moduleCategoryInfo->getExtend->route == $routerMap->route){
|
|
4555
|
$listRoute = $routerMap->route;
|
4592
|
$listRoute = $routerMap->route;
|
|
@@ -4597,7 +4634,7 @@ class PageService{ |
|
@@ -4597,7 +4634,7 @@ class PageService{ |
|
4597
|
$customSelectValue = $sectionBlockLrjSelect->find(".sc-block-items .sc-block-item")->eq(2);
|
4634
|
$customSelectValue = $sectionBlockLrjSelect->find(".sc-block-items .sc-block-item")->eq(2);
|
|
4598
|
if (count($sectionBlockLrjSelect)>=1 && count($customSelectManufacturer)>=1 && count($customSelectValue)>=1){
|
4635
|
if (count($sectionBlockLrjSelect)>=1 && count($customSelectManufacturer)>=1 && count($customSelectValue)>=1){
|
|
4599
|
//取数据
|
4636
|
//取数据
|
|
4600
|
- $brandAndModel = ProductExtendInfo::getProductsAllBrandAndModel($project->id);
|
4637
|
+ $brandAndModel = ExtendInfo::getProductsAllBrandAndModel($project->id);
|
|
4601
|
if (!empty($brandAndModel)){
|
4638
|
if (!empty($brandAndModel)){
|
|
4602
|
$optionBrandStr = "";
|
4639
|
$optionBrandStr = "";
|
|
4603
|
$selectModelStr = "";
|
4640
|
$selectModelStr = "";
|
|
@@ -4680,7 +4717,7 @@ class PageService{ |
|
@@ -4680,7 +4717,7 @@ class PageService{ |
|
4680
|
*/
|
4717
|
*/
|
|
4681
|
public function pagePaginateHandle($phpQueryDom,$routerMap,$pageInfo,$page,$type,$project): bool
|
4718
|
public function pagePaginateHandle($phpQueryDom,$routerMap,$pageInfo,$page,$type,$project): bool
|
|
4682
|
{
|
4719
|
{
|
|
4683
|
- if (!in_array($type, [WebTemplateCommon::$productCategoryName, WebTemplateCommon::$blogCategoryName, WebTemplateCommon::$newsCategoryName, WebTemplateCommon::$extendCategoryName]))
|
4720
|
+ if (!in_array($type, [RouteMap::SOURCE_PRODUCT_CATE, RouteMap::SOURCE_BLOG_CATE, RouteMap::SOURCE_NEWS_CATE, RouteMap::SOURCE_MODULE_CATE]))
|
|
4684
|
return true;
|
4721
|
return true;
|
|
4685
|
$pagePaginationModule = $phpQueryDom["main .pagePagination"]->eq(0);
|
4722
|
$pagePaginationModule = $phpQueryDom["main .pagePagination"]->eq(0);
|
|
4686
|
if (count($pagePaginationModule) >= 1){
|
4723
|
if (count($pagePaginationModule) >= 1){
|
|
@@ -4719,10 +4756,10 @@ class PageService{ |
|
@@ -4719,10 +4756,10 @@ class PageService{ |
|
4719
|
if (!empty($data)) {
|
4756
|
if (!empty($data)) {
|
|
4720
|
foreach ($data as $v) {
|
4757
|
foreach ($data as $v) {
|
|
4721
|
$blockItemDom = clone $blockItemDomOld;
|
4758
|
$blockItemDom = clone $blockItemDomOld;
|
|
4722
|
- if ($type == WebTemplateCommon::$blogCategoryName || $type == WebTemplateCommon::$newsCategoryName || $type == WebTemplateCommon::$extendCategoryName) {
|
4759
|
+ if ($type == RouteMap::SOURCE_BLOG_CATE || $type == RouteMap::SOURCE_NEWS_CATE || $type == RouteMap::SOURCE_MODULE_CATE) {
|
|
4723
|
$this->listNewsBlogExtendHandle($blockItemDom,$v,$titleNum,$descNum);
|
4760
|
$this->listNewsBlogExtendHandle($blockItemDom,$v,$titleNum,$descNum);
|
|
4724
|
}
|
4761
|
}
|
|
4725
|
- if ($type == WebTemplateCommon::$productCategoryName) {
|
4762
|
+ if ($type == RouteMap::SOURCE_PRODUCT_CATE) {
|
|
4726
|
//产品列表页视频处理
|
4763
|
//产品列表页视频处理
|
|
4727
|
$this->productListVideoHandle($blockItemDom,$blockContentVideo,$v);
|
4764
|
$this->productListVideoHandle($blockItemDom,$blockContentVideo,$v);
|
|
4728
|
//图片或图标为产品分类情况下取图片
|
4765
|
//图片或图标为产品分类情况下取图片
|
|
@@ -4734,15 +4771,15 @@ class PageService{ |
|
@@ -4734,15 +4771,15 @@ class PageService{ |
|
4734
|
$blockItemDom->find("[blocktime]")->text($v['created_at']);
|
4771
|
$blockItemDom->find("[blocktime]")->text($v['created_at']);
|
|
4735
|
}
|
4772
|
}
|
|
4736
|
$blockItemDom->find("a")->attr("href", "/" . $v["aUrl"]);
|
4773
|
$blockItemDom->find("a")->attr("href", "/" . $v["aUrl"]);
|
|
4737
|
- if ($type == WebTemplateCommon::$extendCategoryName){
|
4774
|
+ if ($type == RouteMap::SOURCE_MODULE_CATE){
|
|
4738
|
//自定义模块列表页视频处理
|
4775
|
//自定义模块列表页视频处理
|
|
4739
|
$this->productListVideoHandle($blockItemDom,$blockContentVideo,$v);
|
4776
|
$this->productListVideoHandle($blockItemDom,$blockContentVideo,$v);
|
|
4740
|
//扩展模块详情扩展字段处理
|
4777
|
//扩展模块详情扩展字段处理
|
|
4741
|
- $this->extendDataHandle($blockItemDom,$v,$project->id,WebTemplateCommon::$extendName);
|
4778
|
+ $this->extendDataHandle($blockItemDom,$v,$project->id,RouteMap::SOURCE_MODULE);
|
|
4742
|
}
|
4779
|
}
|
|
4743
|
- if ($type == WebTemplateCommon::$productCategoryName){
|
4780
|
+ if ($type == RouteMap::SOURCE_PRODUCT_CATE){
|
|
4744
|
//产品列表页扩展字段处理
|
4781
|
//产品列表页扩展字段处理
|
|
4745
|
- $this->extendDataHandle($blockItemDom,$v,$project->id,WebTemplateCommon::$productName);
|
4782
|
+ $this->extendDataHandle($blockItemDom,$v,$project->id,RouteMap::SOURCE_PRODUCT);
|
|
4746
|
}
|
4783
|
}
|
|
4747
|
$block .= $blockItemDom->htmlOuter();
|
4784
|
$block .= $blockItemDom->htmlOuter();
|
|
4748
|
}
|
4785
|
}
|
|
@@ -4887,7 +4924,7 @@ class PageService{ |
|
@@ -4887,7 +4924,7 @@ class PageService{ |
|
4887
|
public function listDataAndModuleHandle($project,$type,$routerMap,$pageInfo,$phpQueryDom,$page)
|
4924
|
public function listDataAndModuleHandle($project,$type,$routerMap,$pageInfo,$phpQueryDom,$page)
|
|
4888
|
{
|
4925
|
{
|
|
4889
|
//新闻列表
|
4926
|
//新闻列表
|
|
4890
|
- if ($type == WebTemplateCommon::$newsCategoryName){
|
4927
|
+ if ($type == RouteMap::SOURCE_NEWS_CATE){
|
|
4891
|
if ($routerMap->source_id == 0 || $routerMap->route == "news"){
|
4928
|
if ($routerMap->source_id == 0 || $routerMap->route == "news"){
|
|
4892
|
$news = News::where("project_id",$project->id)->where("status",1)->orderBy("sort","desc")->orderBy("id","desc")->offset($pageInfo['offset'])->limit($pageInfo['perPage'])->get();
|
4929
|
$news = News::where("project_id",$project->id)->where("status",1)->orderBy("sort","desc")->orderBy("id","desc")->offset($pageInfo['offset'])->limit($pageInfo['perPage'])->get();
|
|
4893
|
}else{
|
4930
|
}else{
|
|
@@ -4898,15 +4935,15 @@ class PageService{ |
|
@@ -4898,15 +4935,15 @@ class PageService{ |
|
4898
|
$this->listDomModuleHandle($newsListModule,$newsData,$type,$project);
|
4935
|
$this->listDomModuleHandle($newsListModule,$newsData,$type,$project);
|
|
4899
|
}
|
4936
|
}
|
|
4900
|
//自定义扩展列表
|
4937
|
//自定义扩展列表
|
|
4901
|
- if ($type == WebTemplateCommon::$extendCategoryName){
|
|
|
|
4902
|
- $moduleCategoryInfo = ModuleCategory::getModuleCategoryAndExtendById($project->id,$routerMap->source_id);
|
|
|
|
4903
|
- $modules = Module::where("project_id",$project->id)->where("module_id",$moduleCategoryInfo->module_id)->where("category_id","like","%,".$routerMap->source_id.",%")->where("status",0)->orderBy("sort","desc")->orderBy("id","desc")->offset($pageInfo['offset'])->limit($pageInfo['perPage'])->get();
|
|
|
|
4904
|
- $modulesData = Module::modulesListDataHandle($moduleCategoryInfo,$modules);
|
4938
|
+ if ($type == RouteMap::SOURCE_MODULE_CATE){
|
|
|
|
4939
|
+ $moduleCategoryInfo = CustomModuleCategory::getModuleCategoryAndExtendById($project->id,$routerMap->source_id);
|
|
|
|
4940
|
+ $modules = CustomModuleContent::where("project_id",$project->id)->where("module_id",$moduleCategoryInfo->module_id)->where("category_id","like","%,".$routerMap->source_id.",%")->where("status",0)->orderBy("sort","desc")->orderBy("id","desc")->offset($pageInfo['offset'])->limit($pageInfo['perPage'])->get();
|
|
|
|
4941
|
+ $modulesData = CustomModuleContent::modulesListDataHandle($moduleCategoryInfo,$modules);
|
|
4905
|
$modulesListModule = $phpQueryDom["section[newlistblock]"]->eq(0);
|
4942
|
$modulesListModule = $phpQueryDom["section[newlistblock]"]->eq(0);
|
|
4906
|
$this->listDomModuleHandle($modulesListModule,$modulesData,$type,$project);
|
4943
|
$this->listDomModuleHandle($modulesListModule,$modulesData,$type,$project);
|
|
4907
|
}
|
4944
|
}
|
|
4908
|
//博客列表
|
4945
|
//博客列表
|
|
4909
|
- if ($type == WebTemplateCommon::$blogCategoryName){
|
4946
|
+ if ($type == RouteMap::SOURCE_BLOG_CATE){
|
|
4910
|
if ($routerMap->source_id == 0 || $routerMap->route == "blog"){
|
4947
|
if ($routerMap->source_id == 0 || $routerMap->route == "blog"){
|
|
4911
|
$blogs = Blog::where("project_id",$project->id)->where("status",1)->orderBy("sort","desc")->orderBy("id","desc")->offset($pageInfo['offset'])->limit($pageInfo['perPage'])->get();
|
4948
|
$blogs = Blog::where("project_id",$project->id)->where("status",1)->orderBy("sort","desc")->orderBy("id","desc")->offset($pageInfo['offset'])->limit($pageInfo['perPage'])->get();
|
|
4912
|
}else{
|
4949
|
}else{
|
|
@@ -4918,7 +4955,7 @@ class PageService{ |
|
@@ -4918,7 +4955,7 @@ class PageService{ |
|
4918
|
$this->listDomModuleHandle($blogListModule,$blogData,$type,$project);
|
4955
|
$this->listDomModuleHandle($blogListModule,$blogData,$type,$project);
|
|
4919
|
}
|
4956
|
}
|
|
4920
|
//产品列表
|
4957
|
//产品列表
|
|
4921
|
- if ($type == WebTemplateCommon::$productCategoryName){
|
4958
|
+ if ($type == RouteMap::SOURCE_PRODUCT_CATE){
|
|
4922
|
//定制产品特殊分类处理1,思立可项目,项目ID:543
|
4959
|
//定制产品特殊分类处理1,思立可项目,项目ID:543
|
|
4923
|
$productCategoryListModule = $phpQueryDom["section[productcategorylistblock]"]->eq(0);
|
4960
|
$productCategoryListModule = $phpQueryDom["section[productcategorylistblock]"]->eq(0);
|
|
4924
|
//定制产品特殊分类处理2,欣灵项目,项目ID:165
|
4961
|
//定制产品特殊分类处理2,欣灵项目,项目ID:165
|
|
@@ -5125,7 +5162,7 @@ class PageService{ |
|
@@ -5125,7 +5162,7 @@ class PageService{ |
|
5125
|
$categoryblockitemDom = $productListModule->find("[categoryblockitem]")->eq(0);
|
5162
|
$categoryblockitemDom = $productListModule->find("[categoryblockitem]")->eq(0);
|
|
5126
|
if (count($categoryblockitemDom)>=1){
|
5163
|
if (count($categoryblockitemDom)>=1){
|
|
5127
|
//扩展字段列表
|
5164
|
//扩展字段列表
|
|
5128
|
- $productExtend = ProductExtend::where("project_id",$project->id)->orderBy("id","desc")->get();
|
5165
|
+ $productExtend = Extend::where("project_id",$project->id)->orderBy("id","desc")->get();
|
|
5129
|
$block = "";
|
5166
|
$block = "";
|
|
5130
|
foreach ($categoryProducts as $item){
|
5167
|
foreach ($categoryProducts as $item){
|
|
5131
|
if (count($item->products)>=1){
|
5168
|
if (count($item->products)>=1){
|
|
@@ -5153,7 +5190,7 @@ class PageService{ |
|
@@ -5153,7 +5190,7 @@ class PageService{ |
|
5153
|
$td = "";
|
5190
|
$td = "";
|
|
5154
|
if (!empty($productExtend)) {
|
5191
|
if (!empty($productExtend)) {
|
|
5155
|
foreach ($productExtend as $extendInfoItem) {
|
5192
|
foreach ($productExtend as $extendInfoItem) {
|
|
5156
|
- $productExtendInfo = ProductExtendInfo::where("project_id", $project->id)->where("key", $extendInfoItem->key)->where("product_id", $productsFourDataItem['id'])->first();
|
5193
|
+ $productExtendInfo = ExtendInfo::where("project_id", $project->id)->where("key", $extendInfoItem->key)->where("product_id", $productsFourDataItem['id'])->first();
|
|
5157
|
if (!empty($productExtendInfo)) {
|
5194
|
if (!empty($productExtendInfo)) {
|
|
5158
|
if ($extendInfoItem->title == "Product name" || $extendInfoItem->title == "Product Name") {
|
5195
|
if ($extendInfoItem->title == "Product name" || $extendInfoItem->title == "Product Name") {
|
|
5159
|
$td .= '<td><a href="' . "/" . $productsFourDataItem["aUrl"] . "/" . '" data-extend="pd_extended_field" data-extend-type="1" data-extend-value="1">' . $productExtendInfo->values . '</a></td>';
|
5196
|
$td .= '<td><a href="' . "/" . $productsFourDataItem["aUrl"] . "/" . '" data-extend="pd_extended_field" data-extend-type="1" data-extend-value="1">' . $productExtendInfo->values . '</a></td>';
|
|
@@ -5236,7 +5273,7 @@ class PageService{ |
|
@@ -5236,7 +5273,7 @@ class PageService{ |
|
5236
|
$productsArr = [];
|
5273
|
$productsArr = [];
|
|
5237
|
|
5274
|
|
|
5238
|
//产品排序设置
|
5275
|
//产品排序设置
|
|
5239
|
- $orderDataFirst = WebSettingNum::where("project_id",$project->id)->where("type",10)->first();
|
5276
|
+ $orderDataFirst = SettingNum::where("project_id",$project->id)->where("type",10)->first();
|
|
5240
|
if (!empty($orderDataFirst) && !empty($orderDataFirst->data)){
|
5277
|
if (!empty($orderDataFirst) && !empty($orderDataFirst->data)){
|
|
5241
|
$orderData = json_decode($orderDataFirst->data,true);
|
5278
|
$orderData = json_decode($orderDataFirst->data,true);
|
|
5242
|
foreach ($orderData as $key => $orderDataItem){
|
5279
|
foreach ($orderData as $key => $orderDataItem){
|
|
@@ -5282,18 +5319,18 @@ class PageService{ |
|
@@ -5282,18 +5319,18 @@ class PageService{ |
|
5282
|
*/
|
5319
|
*/
|
|
5283
|
public function defaultProductsFiltrateHandle($project,$type,$productListFiltrateModule,$routerMap,$pageInfo)
|
5320
|
public function defaultProductsFiltrateHandle($project,$type,$productListFiltrateModule,$routerMap,$pageInfo)
|
|
5284
|
{
|
5321
|
{
|
|
5285
|
- if ($type == WebTemplateCommon::$productCategoryName){
|
5322
|
+ if ($type == RouteMap::SOURCE_PRODUCT_CATE){
|
|
5286
|
$dataFiltrateKey = $productListFiltrateModule->find("select");
|
5323
|
$dataFiltrateKey = $productListFiltrateModule->find("select");
|
|
5287
|
if (count($dataFiltrateKey)>=1){
|
5324
|
if (count($dataFiltrateKey)>=1){
|
|
5288
|
for ($i = 0;$i < count($dataFiltrateKey);$i++) {
|
5325
|
for ($i = 0;$i < count($dataFiltrateKey);$i++) {
|
|
5289
|
$dataFiltrateKeyValue = $dataFiltrateKey->eq($i)->attr("data-filtrate-key");
|
5326
|
$dataFiltrateKeyValue = $dataFiltrateKey->eq($i)->attr("data-filtrate-key");
|
|
5290
|
if (!empty($dataFiltrateKeyValue)){
|
5327
|
if (!empty($dataFiltrateKeyValue)){
|
|
5291
|
$option = $dataFiltrateKey->eq($i)->find("option")->eq(0);
|
5328
|
$option = $dataFiltrateKey->eq($i)->find("option")->eq(0);
|
|
5292
|
- $productExtend = ProductExtend::where("key",$dataFiltrateKeyValue)->first();
|
5329
|
+ $productExtend = Extend::where("key",$dataFiltrateKeyValue)->first();
|
|
5293
|
$option->text($productExtend->title);
|
5330
|
$option->text($productExtend->title);
|
|
5294
|
$block = $option->htmlOuter();
|
5331
|
$block = $option->htmlOuter();
|
|
5295
|
if ($i == 0){
|
5332
|
if ($i == 0){
|
|
5296
|
- $productExtendInfo = ProductExtendInfo::where("key",$dataFiltrateKeyValue)->whereIn("type",[1,2])->pluck("values")->toArray();
|
5333
|
+ $productExtendInfo = ExtendInfo::where("key",$dataFiltrateKeyValue)->whereIn("type",[1,2])->pluck("values")->toArray();
|
|
5297
|
$productExtendInfo = array_unique($productExtendInfo);
|
5334
|
$productExtendInfo = array_unique($productExtendInfo);
|
|
5298
|
if (!empty($productExtendInfo)){
|
5335
|
if (!empty($productExtendInfo)){
|
|
5299
|
foreach ($productExtendInfo as $productExtendInfoItem){
|
5336
|
foreach ($productExtendInfo as $productExtendInfoItem){
|
|
@@ -5319,13 +5356,13 @@ class PageService{ |
|
@@ -5319,13 +5356,13 @@ class PageService{ |
|
5319
|
//分类列表信息
|
5356
|
//分类列表信息
|
|
5320
|
$categoryListModuleInfoDom = null;
|
5357
|
$categoryListModuleInfoDom = null;
|
|
5321
|
$categoryInfoDom = $phpQueryDom->find("[categorylistimgdesc]");
|
5358
|
$categoryInfoDom = $phpQueryDom->find("[categorylistimgdesc]");
|
|
5322
|
- if ($type == WebTemplateCommon::$productCategoryName){
|
5359
|
+ if ($type == RouteMap::SOURCE_PRODUCT_CATE){
|
|
5323
|
$categoryListModuleInfoDom = $phpQueryDom->find("section[productlistblock]");
|
5360
|
$categoryListModuleInfoDom = $phpQueryDom->find("section[productlistblock]");
|
|
5324
|
}
|
5361
|
}
|
|
5325
|
- if ($type == WebTemplateCommon::$blogCategoryName){
|
5362
|
+ if ($type == RouteMap::SOURCE_BLOG_CATE){
|
|
5326
|
$categoryListModuleInfoDom = $phpQueryDom->find("section[bloglistblock]");
|
5363
|
$categoryListModuleInfoDom = $phpQueryDom->find("section[bloglistblock]");
|
|
5327
|
}
|
5364
|
}
|
|
5328
|
- if ($type == WebTemplateCommon::$newsCategoryName || $type == WebTemplateCommon::$extendCategoryName){
|
5365
|
+ if ($type == RouteMap::SOURCE_NEWS_CATE || $type == RouteMap::SOURCE_MODULE_CATE){
|
|
5329
|
$categoryListModuleInfoDom = $phpQueryDom->find("section[newlistblock]");
|
5366
|
$categoryListModuleInfoDom = $phpQueryDom->find("section[newlistblock]");
|
|
5330
|
}
|
5367
|
}
|
|
5331
|
|
5368
|
|
|
@@ -5335,7 +5372,7 @@ class PageService{ |
|
@@ -5335,7 +5372,7 @@ class PageService{ |
|
5335
|
$image = "";
|
5372
|
$image = "";
|
|
5336
|
if (count($categoryInfoDom)>=1 || !empty($categoryListModuleInfoDom)){
|
5373
|
if (count($categoryInfoDom)>=1 || !empty($categoryListModuleInfoDom)){
|
|
5337
|
//产品分类
|
5374
|
//产品分类
|
|
5338
|
- if ($type == WebTemplateCommon::$productCategoryName){
|
5375
|
+ if ($type == RouteMap::SOURCE_PRODUCT_CATE){
|
|
5339
|
$categoryInfo = Category::where("project_id",$project->id)->where("id",$routerMap->source_id)->where("status",1)->first();
|
5376
|
$categoryInfo = Category::where("project_id",$project->id)->where("id",$routerMap->source_id)->where("status",1)->first();
|
|
5340
|
if (!empty($categoryInfo)){
|
5377
|
if (!empty($categoryInfo)){
|
|
5341
|
$title = !empty($categoryInfo->title) ? $categoryInfo->title : "";
|
5378
|
$title = !empty($categoryInfo->title) ? $categoryInfo->title : "";
|
|
@@ -5345,8 +5382,8 @@ class PageService{ |
|
@@ -5345,8 +5382,8 @@ class PageService{ |
|
5345
|
}
|
5382
|
}
|
|
5346
|
}
|
5383
|
}
|
|
5347
|
//自定义扩展分类
|
5384
|
//自定义扩展分类
|
|
5348
|
- if ($type == WebTemplateCommon::$extendCategoryName){
|
|
|
|
5349
|
- $moduleCategoryInfo = ModuleCategory::getModuleCategoryAndExtendById($project->id,$routerMap->source_id);
|
5385
|
+ if ($type == RouteMap::SOURCE_MODULE_CATE){
|
|
|
|
5386
|
+ $moduleCategoryInfo = CustomModuleCategory::getModuleCategoryAndExtendById($project->id,$routerMap->source_id);
|
|
5350
|
if (!empty($moduleCategoryInfo)){
|
5387
|
if (!empty($moduleCategoryInfo)){
|
|
5351
|
$title = !empty($moduleCategoryInfo->name) ? $moduleCategoryInfo->name : "";
|
5388
|
$title = !empty($moduleCategoryInfo->name) ? $moduleCategoryInfo->name : "";
|
|
5352
|
$desc = !empty($moduleCategoryInfo->remark) ? $moduleCategoryInfo->remark : "";
|
5389
|
$desc = !empty($moduleCategoryInfo->remark) ? $moduleCategoryInfo->remark : "";
|
|
@@ -5354,14 +5391,14 @@ class PageService{ |
|
@@ -5354,14 +5391,14 @@ class PageService{ |
|
5354
|
}
|
5391
|
}
|
|
5355
|
}
|
5392
|
}
|
|
5356
|
//新闻列表
|
5393
|
//新闻列表
|
|
5357
|
- if ($type == WebTemplateCommon::$newsCategoryName){
|
5394
|
+ if ($type == RouteMap::SOURCE_NEWS_CATE){
|
|
5358
|
$newCategory = NewsCategory::where("project_id",$project->id)->where("id",$routerMap->source_id)->where("status",0)->first();
|
5395
|
$newCategory = NewsCategory::where("project_id",$project->id)->where("id",$routerMap->source_id)->where("status",0)->first();
|
|
5359
|
if (!empty($newCategory)){
|
5396
|
if (!empty($newCategory)){
|
|
5360
|
$title = !empty($newCategory->name) ? $newCategory->name : "";
|
5397
|
$title = !empty($newCategory->name) ? $newCategory->name : "";
|
|
5361
|
}
|
5398
|
}
|
|
5362
|
}
|
5399
|
}
|
|
5363
|
//博客列表
|
5400
|
//博客列表
|
|
5364
|
- if ($type == WebTemplateCommon::$blogCategoryName){
|
5401
|
+ if ($type == RouteMap::SOURCE_BLOG_CATE){
|
|
5365
|
$blogCategory = BlogCategory::where("project_id",$project->id)->where("id",$routerMap->source_id)->where("status",0)->first();
|
5402
|
$blogCategory = BlogCategory::where("project_id",$project->id)->where("id",$routerMap->source_id)->where("status",0)->first();
|
|
5366
|
if (!empty($blogCategory)){
|
5403
|
if (!empty($blogCategory)){
|
|
5367
|
$title = !empty($blogCategory->name) ? $blogCategory->name : "";
|
5404
|
$title = !empty($blogCategory->name) ? $blogCategory->name : "";
|
|
@@ -5408,7 +5445,7 @@ class PageService{ |
|
@@ -5408,7 +5445,7 @@ class PageService{ |
|
5408
|
*/
|
5445
|
*/
|
|
5409
|
public function listPageUrlHandle($project,$type,$routerMap,$pageInfo,$phpQueryDom,$page)
|
5446
|
public function listPageUrlHandle($project,$type,$routerMap,$pageInfo,$phpQueryDom,$page)
|
|
5410
|
{
|
5447
|
{
|
|
5411
|
- if ($type == WebTemplateCommon::$newsCategoryName || $type == WebTemplateCommon::$blogCategoryName || $type == WebTemplateCommon::$productCategoryName || $type == WebTemplateCommon::$extendCategoryName){
|
5448
|
+ if ($type == RouteMap::SOURCE_NEWS_CATE || $type == RouteMap::SOURCE_BLOG_CATE || $type == RouteMap::SOURCE_PRODUCT_CATE || $type == RouteMap::SOURCE_MODULE_CATE){
|
|
5412
|
//渲染产品分类数据
|
5449
|
//渲染产品分类数据
|
|
5413
|
$this->categoryInfoModuleHandle($project,$type,$phpQueryDom,$routerMap);
|
5450
|
$this->categoryInfoModuleHandle($project,$type,$phpQueryDom,$routerMap);
|
|
5414
|
|
5451
|
|
|
@@ -5455,7 +5492,7 @@ class PageService{ |
|
@@ -5455,7 +5492,7 @@ class PageService{ |
|
5455
|
*/
|
5492
|
*/
|
|
5456
|
public function moduleDetailsDomHandle($project,$phpQueryDom,$routerMap)
|
5493
|
public function moduleDetailsDomHandle($project,$phpQueryDom,$routerMap)
|
|
5457
|
{
|
5494
|
{
|
|
5458
|
- $modules_detail = Module::where("project_id",$project->id)->where("id",$routerMap->source_id)->where("status",0)->first();
|
5495
|
+ $modules_detail = CustomModuleContent::where("project_id",$project->id)->where("id",$routerMap->source_id)->where("status",0)->first();
|
|
5459
|
$detailsModule = $phpQueryDom->find(".section-pagenew-wrap-block")->eq(0);
|
5496
|
$detailsModule = $phpQueryDom->find(".section-pagenew-wrap-block")->eq(0);
|
|
5460
|
if (count($detailsModule) >= 1){
|
5497
|
if (count($detailsModule) >= 1){
|
|
5461
|
$detailsModule->find("[blocktitle]")->text($modules_detail->name);
|
5498
|
$detailsModule->find("[blocktitle]")->text($modules_detail->name);
|
|
@@ -5474,7 +5511,7 @@ class PageService{ |
|
@@ -5474,7 +5511,7 @@ class PageService{ |
|
5474
|
}
|
5511
|
}
|
|
5475
|
|
5512
|
|
|
5476
|
//扩展模块详情扩展字段处理
|
5513
|
//扩展模块详情扩展字段处理
|
|
5477
|
- $this->extendDataHandle($phpQueryDom,$modules_detail,$project->id,WebTemplateCommon::$extendName);
|
5514
|
+ $this->extendDataHandle($phpQueryDom,$modules_detail,$project->id,RouteMap::SOURCE_MODULE);
|
|
5478
|
}
|
5515
|
}
|
|
5479
|
|
5516
|
|
|
5480
|
/**
|
5517
|
/**
|
|
@@ -5535,11 +5572,11 @@ class PageService{ |
|
@@ -5535,11 +5572,11 @@ class PageService{ |
|
5535
|
*/
|
5572
|
*/
|
|
5536
|
public function detailsDataAndModuleHandle($project,$routerMap,$type,$phpQueryDom)
|
5573
|
public function detailsDataAndModuleHandle($project,$routerMap,$type,$phpQueryDom)
|
|
5537
|
{
|
5574
|
{
|
|
5538
|
- $templateInfo = BSetting::getProjectTemplateInfo($project->id);
|
|
|
|
5539
|
- $webTemplateQuery = WebTemplate::where("project_id",$project->id)->where("status",0)->where("template_id",$templateInfo->template_id);
|
5575
|
+ $templateInfo = Setting::getProjectTemplateInfo($project->id);
|
|
|
|
5576
|
+ $webTemplateQuery = BTemplate::where("project_id",$project->id)->where("status",0)->where("template_id",$templateInfo->template_id);
|
|
5540
|
//新闻详情
|
5577
|
//新闻详情
|
|
5541
|
- if ($type == WebTemplateCommon::$newsName){
|
|
|
|
5542
|
- $webTemplateQuery = $webTemplateQuery->where("source",WebTemplateCommon::$newsSource)->where("source_id",$routerMap->source_id)->first();
|
5578
|
+ if ($type == RouteMap::SOURCE_NEWS){
|
|
|
|
5579
|
+ $webTemplateQuery = $webTemplateQuery->where("source",BTemplate::SOURCE_NEWS)->where("source_id",$routerMap->source_id)->first();
|
|
5543
|
$news_detail = News::where("project_id",$project->id)->where("id",$routerMap->source_id)->where("status",1)->first();
|
5580
|
$news_detail = News::where("project_id",$project->id)->where("id",$routerMap->source_id)->where("status",1)->first();
|
|
5544
|
if (empty($webTemplateQuery) || strtotime($webTemplateQuery->updated_at) < strtotime('2023-12-25 19:40:00')){
|
5581
|
if (empty($webTemplateQuery) || strtotime($webTemplateQuery->updated_at) < strtotime('2023-12-25 19:40:00')){
|
|
5545
|
$this->newsDetailsDomHandle($phpQueryDom,$news_detail);
|
5582
|
$this->newsDetailsDomHandle($phpQueryDom,$news_detail);
|
|
@@ -5547,28 +5584,28 @@ class PageService{ |
|
@@ -5547,28 +5584,28 @@ class PageService{ |
|
5547
|
$this->newsPagePrevNextHandle($phpQueryDom,$news_detail);
|
5584
|
$this->newsPagePrevNextHandle($phpQueryDom,$news_detail);
|
|
5548
|
}
|
5585
|
}
|
|
5549
|
//自定义扩展详情
|
5586
|
//自定义扩展详情
|
|
5550
|
- if ($type == WebTemplateCommon::$extendName){
|
|
|
|
5551
|
- $webTemplateQuery = $webTemplateQuery->where("source",7)->where("source_id",$routerMap->source_id)->where("is_custom",1)->where("is_list",0)->first();
|
5587
|
+ if ($type == RouteMap::SOURCE_MODULE){
|
|
|
|
5588
|
+ $webTemplateQuery = $webTemplateQuery->where("source_id",$routerMap->source_id)->where("is_custom",1)->where("is_list",0)->first();
|
|
5552
|
if (empty($webTemplateQuery) || strtotime($webTemplateQuery->updated_at) < strtotime('2023-12-25 19:40:00')){
|
5589
|
if (empty($webTemplateQuery) || strtotime($webTemplateQuery->updated_at) < strtotime('2023-12-25 19:40:00')){
|
|
5553
|
$this->moduleDetailsDomHandle($project,$phpQueryDom,$routerMap);
|
5590
|
$this->moduleDetailsDomHandle($project,$phpQueryDom,$routerMap);
|
|
5554
|
}
|
5591
|
}
|
|
5555
|
}
|
5592
|
}
|
|
5556
|
//博客详情
|
5593
|
//博客详情
|
|
5557
|
- if ($type == WebTemplateCommon::$blogName){
|
|
|
|
5558
|
- $webTemplateQuery = $webTemplateQuery->where("source",WebTemplateCommon::$blogSource)->where("source_id",$routerMap->source_id)->first();
|
5594
|
+ if ($type == RouteMap::SOURCE_BLOG){
|
|
|
|
5595
|
+ $webTemplateQuery = $webTemplateQuery->where("source",BTemplate::SOURCE_BLOG)->where("source_id",$routerMap->source_id)->first();
|
|
5559
|
if (empty($webTemplateQuery) || strtotime($webTemplateQuery->updated_at) < strtotime('2023-12-25 19:40:00')){
|
5596
|
if (empty($webTemplateQuery) || strtotime($webTemplateQuery->updated_at) < strtotime('2023-12-25 19:40:00')){
|
|
5560
|
$this->blogDetailsDomHandle($project,$phpQueryDom,$routerMap);
|
5597
|
$this->blogDetailsDomHandle($project,$phpQueryDom,$routerMap);
|
|
5561
|
}
|
5598
|
}
|
|
5562
|
}
|
5599
|
}
|
|
5563
|
//产品详情
|
5600
|
//产品详情
|
|
5564
|
- if ($type == WebTemplateCommon::$productName){
|
5601
|
+ if ($type == RouteMap::SOURCE_PRODUCT){
|
|
5565
|
$products_detail = Product::where("project_id",$project->id)->where("id",$routerMap->source_id)->where("status",1)->whereNotNull('route')->first();
|
5602
|
$products_detail = Product::where("project_id",$project->id)->where("id",$routerMap->source_id)->where("status",1)->whereNotNull('route')->first();
|
|
5566
|
$products_detail = $this->productDataHandle($project,$products_detail);
|
5603
|
$products_detail = $this->productDataHandle($project,$products_detail);
|
|
5567
|
//FIXME 2024-01-12 13:00:00之前重置产品详情html
|
5604
|
//FIXME 2024-01-12 13:00:00之前重置产品详情html
|
|
5568
|
$flag = false;
|
5605
|
$flag = false;
|
|
5569
|
- $webTemplateQuery = $webTemplateQuery->where("source",WebTemplateCommon::$product)->where("source_id",$routerMap->source_id)->first();
|
5606
|
+ $webTemplateQuery = $webTemplateQuery->where("source",BTemplate::SOURCE_PRODUCT)->where("source_id",$routerMap->source_id)->first();
|
|
5570
|
if (empty($webTemplateQuery)){
|
5607
|
if (empty($webTemplateQuery)){
|
|
5571
|
- $productTemplateMain = WebTemplateMain::where("project_id",$project->id)->where("type",WebTemplateCommon::$product)->where("is_custom",0)->where("is_list",0)->first();
|
5608
|
+ $productTemplateMain = BTemplateMain::where("project_id",$project->id)->where("type",Template::SOURCE_PRODUCT)->where("is_custom",0)->where("is_list",0)->first();
|
|
5572
|
if (!empty($productTemplateMain) && strtotime($productTemplateMain->updated_at) < strtotime('2024-01-12 13:00:00')){
|
5609
|
if (!empty($productTemplateMain) && strtotime($productTemplateMain->updated_at) < strtotime('2024-01-12 13:00:00')){
|
|
5573
|
$flag = true;
|
5610
|
$flag = true;
|
|
5574
|
}
|
5611
|
}
|
|
@@ -5596,13 +5633,13 @@ class PageService{ |
|
@@ -5596,13 +5633,13 @@ class PageService{ |
|
5596
|
$extendModuleType = (int)$extendModuleBox->attr("data-extend-type");
|
5633
|
$extendModuleType = (int)$extendModuleBox->attr("data-extend-type");
|
|
5597
|
$extendModuleValue = (int)$extendModuleBox->attr("data-extend-value");
|
5634
|
$extendModuleValue = (int)$extendModuleBox->attr("data-extend-value");
|
|
5598
|
if (!empty($extendModuleValue)){
|
5635
|
if (!empty($extendModuleValue)){
|
|
5599
|
- if($extendModuleType == ProductExtend::$textExtendType){
|
5636
|
+ if($extendModuleType == Extend::$textExtendType){
|
|
5600
|
//文本输入框
|
5637
|
//文本输入框
|
|
5601
|
$this->extendDataTextHandle($projectId,$data,$extendModuleBox,$extendModuleType,$extendModuleValue,$type);
|
5638
|
$this->extendDataTextHandle($projectId,$data,$extendModuleBox,$extendModuleType,$extendModuleValue,$type);
|
|
5602
|
- }elseif ($extendModuleType == ProductExtend::$codeExtendType){
|
5639
|
+ }elseif ($extendModuleType == Extend::$codeExtendType){
|
|
5603
|
//代码快
|
5640
|
//代码快
|
|
5604
|
$this->extendDataCodeHandle($projectId,$data,$extendModuleBox,$extendModuleType,$extendModuleValue,$type);
|
5641
|
$this->extendDataCodeHandle($projectId,$data,$extendModuleBox,$extendModuleType,$extendModuleValue,$type);
|
|
5605
|
- }elseif ($extendModuleType == ProductExtend::$fileExtendType){
|
5642
|
+ }elseif ($extendModuleType == Extend::$fileExtendType){
|
|
5606
|
//文件列表
|
5643
|
//文件列表
|
|
5607
|
$this->extendDataFileHandle($projectId,$data,$extendModuleBox,$extendModuleType,$extendModuleValue,$type);
|
5644
|
$this->extendDataFileHandle($projectId,$data,$extendModuleBox,$extendModuleType,$extendModuleValue,$type);
|
|
5608
|
}else{
|
5645
|
}else{
|
|
@@ -5621,11 +5658,11 @@ class PageService{ |
|
@@ -5621,11 +5658,11 @@ class PageService{ |
|
5621
|
public function extendDataImageHandle($projectId,$data,$extendModuleBox,$extendModuleType,$extendModuleValue,$type)
|
5658
|
public function extendDataImageHandle($projectId,$data,$extendModuleBox,$extendModuleType,$extendModuleValue,$type)
|
|
5622
|
{
|
5659
|
{
|
|
5623
|
$extendInfo = null;
|
5660
|
$extendInfo = null;
|
|
5624
|
- if ($type == WebTemplateCommon::$productName){
|
|
|
|
5625
|
- $extendInfo = ProductExtendInfo::where("key","pd_extended_field_".(string)$extendModuleValue)->where("project_id",$projectId)->where("product_id",$data['id'])->where("type",$extendModuleType)->first();
|
5661
|
+ if ($type == RouteMap::SOURCE_PRODUCT){
|
|
|
|
5662
|
+ $extendInfo = ExtendInfo::where("key","pd_extended_field_".(string)$extendModuleValue)->where("project_id",$projectId)->where("product_id",$data['id'])->where("type",$extendModuleType)->first();
|
|
5626
|
}
|
5663
|
}
|
|
5627
|
- if ($type == WebTemplateCommon::$extendName){
|
|
|
|
5628
|
- $extendInfo = CustomModuleExtendContent::where("key","pd_extended_field_".(string)$extendModuleValue)->where("project_id",$projectId)->where("content_id",$data['id'])->where("type",$extendModuleType)->first();
|
5664
|
+ if ($type == RouteMap::SOURCE_MODULE){
|
|
|
|
5665
|
+ $extendInfo = CustomModuleExtentContent::where("key","pd_extended_field_".(string)$extendModuleValue)->where("project_id",$projectId)->where("content_id",$data['id'])->where("type",$extendModuleType)->first();
|
|
5629
|
}
|
5666
|
}
|
|
5630
|
|
5667
|
|
|
5631
|
if (!empty($extendInfo) && !empty($extendInfo->values)){
|
5668
|
if (!empty($extendInfo) && !empty($extendInfo->values)){
|
|
@@ -5664,11 +5701,11 @@ class PageService{ |
|
@@ -5664,11 +5701,11 @@ class PageService{ |
|
5664
|
public function extendDataFileHandle($projectId,$data,$extendModuleBox,$extendModuleType,$extendModuleValue,$type)
|
5701
|
public function extendDataFileHandle($projectId,$data,$extendModuleBox,$extendModuleType,$extendModuleValue,$type)
|
|
5665
|
{
|
5702
|
{
|
|
5666
|
$extendInfo = null;
|
5703
|
$extendInfo = null;
|
|
5667
|
- if ($type == WebTemplateCommon::$productName){
|
|
|
|
5668
|
- $extendInfo = ProductExtendInfo::where("key","pd_extended_field_".$extendModuleValue)->where("project_id",$projectId)->where("product_id",$data['id'])->where("type",$extendModuleType)->first();
|
5704
|
+ if ($type == RouteMap::SOURCE_PRODUCT){
|
|
|
|
5705
|
+ $extendInfo = ExtendInfo::where("key","pd_extended_field_".$extendModuleValue)->where("project_id",$projectId)->where("product_id",$data['id'])->where("type",$extendModuleType)->first();
|
|
5669
|
}
|
5706
|
}
|
|
5670
|
- if ($type == WebTemplateCommon::$extendName){
|
|
|
|
5671
|
- $extendInfo = CustomModuleExtendContent::where("key","pd_extended_field_".$extendModuleValue)->where("project_id",$projectId)->where("content_id",$data['id'])->where("type",$extendModuleType)->first();
|
5707
|
+ if ($type == RouteMap::SOURCE_MODULE){
|
|
|
|
5708
|
+ $extendInfo = CustomModuleExtentContent::where("key","pd_extended_field_".$extendModuleValue)->where("project_id",$projectId)->where("content_id",$data['id'])->where("type",$extendModuleType)->first();
|
|
5672
|
}
|
5709
|
}
|
|
5673
|
if (!empty($extendInfo) && !empty($extendInfo->values)){
|
5710
|
if (!empty($extendInfo) && !empty($extendInfo->values)){
|
|
5674
|
$values = $extendInfo->values;
|
5711
|
$values = $extendInfo->values;
|
|
@@ -5710,14 +5747,14 @@ class PageService{ |
|
@@ -5710,14 +5747,14 @@ class PageService{ |
|
5710
|
*/
|
5747
|
*/
|
|
5711
|
public function extendDataCodeHandle($projectId,$data,$extendModuleBox,$extendModuleType,$extendModuleValue,$type)
|
5748
|
public function extendDataCodeHandle($projectId,$data,$extendModuleBox,$extendModuleType,$extendModuleValue,$type)
|
|
5712
|
{
|
5749
|
{
|
|
5713
|
- if ($type == WebTemplateCommon::$productName){
|
|
|
|
5714
|
- $productExtendInfo = ProductExtendInfo::where("key","pd_extended_field_".$extendModuleValue)->where("project_id",$projectId)->where("product_id",$data['id'])->where("type",$extendModuleType)->first();
|
5750
|
+ if ($type == RouteMap::SOURCE_PRODUCT){
|
|
|
|
5751
|
+ $productExtendInfo = ExtendInfo::where("key","pd_extended_field_".$extendModuleValue)->where("project_id",$projectId)->where("product_id",$data['id'])->where("type",$extendModuleType)->first();
|
|
5715
|
if (!empty($productExtendInfo) && !empty($productExtendInfo->values)){
|
5752
|
if (!empty($productExtendInfo) && !empty($productExtendInfo->values)){
|
|
5716
|
$extendModuleBox->html($productExtendInfo->values);
|
5753
|
$extendModuleBox->html($productExtendInfo->values);
|
|
5717
|
}
|
5754
|
}
|
|
5718
|
}
|
5755
|
}
|
|
5719
|
- if ($type == WebTemplateCommon::$extendName){
|
|
|
|
5720
|
- $extendInfo = CustomModuleExtendContent::where("key","pd_extended_field_".$extendModuleValue)->where("project_id",$projectId)->where("content_id",$data['id'])->where("type",$extendModuleType)->first();
|
5756
|
+ if ($type == RouteMap::SOURCE_MODULE){
|
|
|
|
5757
|
+ $extendInfo = CustomModuleExtentContent::where("key","pd_extended_field_".$extendModuleValue)->where("project_id",$projectId)->where("content_id",$data['id'])->where("type",$extendModuleType)->first();
|
|
5721
|
if (!empty($extendInfo) && !empty($extendInfo->values)){
|
5758
|
if (!empty($extendInfo) && !empty($extendInfo->values)){
|
|
5722
|
$extendModuleBox->html($extendInfo->values);
|
5759
|
$extendModuleBox->html($extendInfo->values);
|
|
5723
|
}
|
5760
|
}
|
|
@@ -5730,8 +5767,8 @@ class PageService{ |
|
@@ -5730,8 +5767,8 @@ class PageService{ |
|
5730
|
public function extendDataTextHandle($projectId,$data,$extendModuleBox,$extendModuleType,$extendModuleValue,$type)
|
5767
|
public function extendDataTextHandle($projectId,$data,$extendModuleBox,$extendModuleType,$extendModuleValue,$type)
|
|
5731
|
{
|
5768
|
{
|
|
5732
|
//产品扩展字段
|
5769
|
//产品扩展字段
|
|
5733
|
- if ($type == WebTemplateCommon::$productName){
|
|
|
|
5734
|
- $extendInfo = ProductExtendInfo::where("key","pd_extended_field_".$extendModuleValue)->where("project_id",$projectId)->where("product_id",$data['id'])->where("type",$extendModuleType)->first();
|
5770
|
+ if ($type == RouteMap::SOURCE_PRODUCT){
|
|
|
|
5771
|
+ $extendInfo = ExtendInfo::where("key","pd_extended_field_".$extendModuleValue)->where("project_id",$projectId)->where("product_id",$data['id'])->where("type",$extendModuleType)->first();
|
|
5735
|
if (!empty($extendInfo) && !empty($extendInfo->values)){
|
5772
|
if (!empty($extendInfo) && !empty($extendInfo->values)){
|
|
5736
|
$extendModuleBox->html($extendInfo->values);
|
5773
|
$extendModuleBox->html($extendInfo->values);
|
|
5737
|
}else{
|
5774
|
}else{
|
|
@@ -5739,8 +5776,8 @@ class PageService{ |
|
@@ -5739,8 +5776,8 @@ class PageService{ |
|
5739
|
}
|
5776
|
}
|
|
5740
|
}
|
5777
|
}
|
|
5741
|
//扩展模块扩展字段
|
5778
|
//扩展模块扩展字段
|
|
5742
|
- if ($type == WebTemplateCommon::$extendName){
|
|
|
|
5743
|
- $customModuleExtendInfo = CustomModuleExtendContent::where("key","pd_extended_field_".$extendModuleValue)->where("project_id",$projectId)->where("content_id",$data['id'])->where("type",$extendModuleType)->first();
|
5779
|
+ if ($type == RouteMap::SOURCE_MODULE){
|
|
|
|
5780
|
+ $customModuleExtendInfo = CustomModuleExtentContent::where("key","pd_extended_field_".$extendModuleValue)->where("project_id",$projectId)->where("content_id",$data['id'])->where("type",$extendModuleType)->first();
|
|
5744
|
if (!empty($customModuleExtendInfo) && !empty($customModuleExtendInfo->values)){
|
5781
|
if (!empty($customModuleExtendInfo) && !empty($customModuleExtendInfo->values)){
|
|
5745
|
$extendModuleBox->html($customModuleExtendInfo->values);
|
5782
|
$extendModuleBox->html($customModuleExtendInfo->values);
|
|
5746
|
}else{
|
5783
|
}else{
|
|
@@ -5783,25 +5820,25 @@ class PageService{ |
|
@@ -5783,25 +5820,25 @@ class PageService{ |
|
5783
|
if (!empty($isVisualization)){
|
5820
|
if (!empty($isVisualization)){
|
|
5784
|
$isVisualization = json_decode($isVisualization);
|
5821
|
$isVisualization = json_decode($isVisualization);
|
|
5785
|
switch ($type) {
|
5822
|
switch ($type) {
|
|
5786
|
- case WebTemplateCommon::$productName:
|
5823
|
+ case RouteMap::SOURCE_PRODUCT:
|
|
5787
|
$isVisual = $isVisualization->product_details;
|
5824
|
$isVisual = $isVisualization->product_details;
|
|
5788
|
break;
|
5825
|
break;
|
|
5789
|
- case WebTemplateCommon::$productCategoryName:
|
5826
|
+ case RouteMap::SOURCE_PRODUCT_CATE:
|
|
5790
|
$isVisual = $isVisualization->product_list;
|
5827
|
$isVisual = $isVisualization->product_list;
|
|
5791
|
break;
|
5828
|
break;
|
|
5792
|
- case WebTemplateCommon::$blogName:
|
5829
|
+ case RouteMap::SOURCE_BLOG:
|
|
5793
|
$isVisual = $isVisualization->blog_details;
|
5830
|
$isVisual = $isVisualization->blog_details;
|
|
5794
|
break;
|
5831
|
break;
|
|
5795
|
- case WebTemplateCommon::$blogCategoryName:
|
5832
|
+ case RouteMap::SOURCE_BLOG_CATE:
|
|
5796
|
$isVisual = $isVisualization->blog_list;
|
5833
|
$isVisual = $isVisualization->blog_list;
|
|
5797
|
break;
|
5834
|
break;
|
|
5798
|
- case WebTemplateCommon::$newsName:
|
5835
|
+ case RouteMap::SOURCE_NEWS:
|
|
5799
|
$isVisual = $isVisualization->news_details;
|
5836
|
$isVisual = $isVisualization->news_details;
|
|
5800
|
break;
|
5837
|
break;
|
|
5801
|
- case WebTemplateCommon::$newsCategoryName:
|
5838
|
+ case RouteMap::SOURCE_NEWS_CATE:
|
|
5802
|
$isVisual = $isVisualization->news_list;
|
5839
|
$isVisual = $isVisualization->news_list;
|
|
5803
|
break;
|
5840
|
break;
|
|
5804
|
- case WebTemplateCommon::$indexName:
|
5841
|
+ case RouteMap::SOURCE_INDEX:
|
|
5805
|
$isVisual = $isVisualization->index_page;
|
5842
|
$isVisual = $isVisualization->index_page;
|
|
5806
|
break;
|
5843
|
break;
|
|
5807
|
default:
|
5844
|
default:
|