Merge branch 'develop' of http://47.244.231.31:8099/zhl/globalso-v6
正在显示
1 个修改的文件
包含
13 行增加
和
14 行删除
| @@ -235,7 +235,7 @@ class BTemplateLogic extends BaseLogic | @@ -235,7 +235,7 @@ class BTemplateLogic extends BaseLogic | ||
| 235 | $bTemplateMainModel = new BTemplateMain(); | 235 | $bTemplateMainModel = new BTemplateMain(); |
| 236 | $mainInfo = $bTemplateMainModel->read(['project_id'=>$this->user['project_id'],'type'=>$type]); | 236 | $mainInfo = $bTemplateMainModel->read(['project_id'=>$this->user['project_id'],'type'=>$type]); |
| 237 | if($mainInfo === false){ | 237 | if($mainInfo === false){ |
| 238 | - $data['main_html'] = $this->getModule($type,$is_custom); | 238 | + $data['main_html'] = $this->getModule($type); |
| 239 | $data['main_css'] = "<style id='globalsojs-styles'></style>"; | 239 | $data['main_css'] = "<style id='globalsojs-styles'></style>"; |
| 240 | }else{ | 240 | }else{ |
| 241 | $data['main_html'] = $mainInfo['main_html']; | 241 | $data['main_html'] = $mainInfo['main_html']; |
| @@ -621,10 +621,7 @@ class BTemplateLogic extends BaseLogic | @@ -621,10 +621,7 @@ class BTemplateLogic extends BaseLogic | ||
| 621 | * @method :post | 621 | * @method :post |
| 622 | * @time :2023/7/27 15:08 | 622 | * @time :2023/7/27 15:08 |
| 623 | */ | 623 | */ |
| 624 | - public function getModule($type,$is_custom){ | ||
| 625 | - if($is_custom == BTemplate::SOURCE_CUSTOM){ | ||
| 626 | - $type == BTemplate::TYPE_CUSTOM_DETAIL; | ||
| 627 | - } | 624 | + public function getModule($type){ |
| 628 | $mainModel = new TemplateTypeMain(); | 625 | $mainModel = new TemplateTypeMain(); |
| 629 | $info = $mainModel->read(['type'=>$type]); | 626 | $info = $mainModel->read(['type'=>$type]); |
| 630 | return $info['main_html']; | 627 | return $info['main_html']; |
| @@ -667,14 +664,6 @@ class BTemplateLogic extends BaseLogic | @@ -667,14 +664,6 @@ class BTemplateLogic extends BaseLogic | ||
| 667 | return $this->success($list); | 664 | return $this->success($list); |
| 668 | } | 665 | } |
| 669 | 666 | ||
| 670 | - | ||
| 671 | - /** | ||
| 672 | - * @remark :获取类型 | ||
| 673 | - * @name :getModuleType | ||
| 674 | - * @author :lyh | ||
| 675 | - * @method :any | ||
| 676 | - * @time :2023/7/17 16:03 | ||
| 677 | - */ | ||
| 678 | /** | 667 | /** |
| 679 | * @remark :获取类型 | 668 | * @remark :获取类型 |
| 680 | * @name :getModuleType | 669 | * @name :getModuleType |
| @@ -701,6 +690,13 @@ class BTemplateLogic extends BaseLogic | @@ -701,6 +690,13 @@ class BTemplateLogic extends BaseLogic | ||
| 701 | return $this->success($data); | 690 | return $this->success($data); |
| 702 | } | 691 | } |
| 703 | 692 | ||
| 693 | + /** | ||
| 694 | + * @remark :获取类型 | ||
| 695 | + * @name :getModuleTypes | ||
| 696 | + * @author :lyh | ||
| 697 | + * @method :post | ||
| 698 | + * @time :2023/12/26 14:18 | ||
| 699 | + */ | ||
| 704 | public function getModuleTypes(){ | 700 | public function getModuleTypes(){ |
| 705 | $data['module'] = ['默认','产品','新闻','博客','产品分类']; | 701 | $data['module'] = ['默认','产品','新闻','博客','产品分类']; |
| 706 | $data = [ | 702 | $data = [ |
| @@ -847,7 +843,10 @@ class BTemplateLogic extends BaseLogic | @@ -847,7 +843,10 @@ class BTemplateLogic extends BaseLogic | ||
| 847 | $bTemplateMainModel = new BTemplateMain(); | 843 | $bTemplateMainModel = new BTemplateMain(); |
| 848 | $mainInfo = $bTemplateMainModel->read(['project_id'=>$this->user['project_id'],'type'=>$this->param['type'],'is_custom'=>$is_custom]); | 844 | $mainInfo = $bTemplateMainModel->read(['project_id'=>$this->user['project_id'],'type'=>$this->param['type'],'is_custom'=>$is_custom]); |
| 849 | if($mainInfo === false){ | 845 | if($mainInfo === false){ |
| 850 | - $main_html = $this->getModule($this->param['type'],$is_custom); | 846 | + if($is_custom == BTemplate::SOURCE_CUSTOM) { |
| 847 | + $this->param['type'] = BTemplate::TYPE_CUSTOM_DETAIL; | ||
| 848 | + } | ||
| 849 | + $main_html = $this->getModule($this->param['type']); | ||
| 851 | $main_style = "<style id='globalsojs-styles'></style>"; | 850 | $main_style = "<style id='globalsojs-styles'></style>"; |
| 852 | }else{ | 851 | }else{ |
| 853 | $main_html = $mainInfo['main_html']; | 852 | $main_html = $mainInfo['main_html']; |
-
请 注册 或 登录 后发表评论