正在显示
4 个修改的文件
包含
25 行增加
和
15 行删除
| @@ -102,7 +102,7 @@ class MailController extends BaseController | @@ -102,7 +102,7 @@ class MailController extends BaseController | ||
| 102 | $arr[] = $v['mail_id']; | 102 | $arr[] = $v['mail_id']; |
| 103 | } | 103 | } |
| 104 | $mailModel = new MailModel(); | 104 | $mailModel = new MailModel(); |
| 105 | - $mail_list = $mailModel->list(['id'=>['not in',$arr]]); | 105 | + $mail_list = $mailModel->list(['id'=>['not in',$arr],'user_id'=>['like',','.$this->user['id'].',']]); |
| 106 | $data = []; | 106 | $data = []; |
| 107 | foreach ($mail_list as $k => $v){ | 107 | foreach ($mail_list as $k => $v){ |
| 108 | $data[] = [ | 108 | $data[] = [ |
| @@ -309,7 +309,7 @@ class BTemplateLogic extends BaseLogic | @@ -309,7 +309,7 @@ class BTemplateLogic extends BaseLogic | ||
| 309 | $param['is_custom'] = 0; | 309 | $param['is_custom'] = 0; |
| 310 | } | 310 | } |
| 311 | $info = $this->webTemplateInfo($this->param['template_id'],$param['source'],$param['source_id'],$param['is_custom']); | 311 | $info = $this->webTemplateInfo($this->param['template_id'],$param['source'],$param['source_id'],$param['is_custom']); |
| 312 | - if($param['is_custom'] != 0){//TODO::自定义默认默认取首页的头部底部 | 312 | + if($param['is_custom'] != 0){//TODO::自定义默认默认取首页的头部底部,不需要保存头部底部 |
| 313 | $this->saveCommonTemplate($param); | 313 | $this->saveCommonTemplate($param); |
| 314 | } | 314 | } |
| 315 | $param['project_id'] = $this->user['project_id']; | 315 | $param['project_id'] = $this->user['project_id']; |
| @@ -368,10 +368,13 @@ class BTemplateLogic extends BaseLogic | @@ -368,10 +368,13 @@ class BTemplateLogic extends BaseLogic | ||
| 368 | $pageSettingModel = new PageSetting(); | 368 | $pageSettingModel = new PageSetting(); |
| 369 | $pageInfo = $pageSettingModel->read(['project_id' => $this->user['project_id']]); | 369 | $pageInfo = $pageSettingModel->read(['project_id' => $this->user['project_id']]); |
| 370 | if ($pageInfo !== false) { | 370 | if ($pageInfo !== false) { |
| 371 | - if ($source == 2) {if ($source_id != 0) {if ($pageInfo['product_details'] != 0) {$type = 2;}} else {if ($pageInfo['product_list'] != 0) {$type = 3;}}} | ||
| 372 | - if ($source == 3) {if ($source_id != 0) {if ($pageInfo['blog_details'] != 0) {$type = 4;}} else {if ($pageInfo['blog_list'] != 0) {$type = 5;}}} | ||
| 373 | - if ($source == 4) {if ($source_id != 0) {if ($pageInfo['news_details'] != 0) {$type = 6;}} else {if ($pageInfo['news_list'] != 0) {$type = 7;}}} | ||
| 374 | - if ($source == 5) {if ($pageInfo['polymerization'] != 0) {$type = 8;}} | 371 | + if ($source == BTemplate::SOURCE_PRODUCT) {if ($source_id != 0) {if ($pageInfo['product_details'] != 0) {$type = BTemplate::TYPE_TWO;}} |
| 372 | + else {if ($pageInfo['product_list'] != 0) {$type = BTemplate::TYPE_THREE;}}} | ||
| 373 | + if ($source == BTemplate::SOURCE_BLOG) {if ($source_id != 0) {if ($pageInfo['blog_details'] != 0) {$type = BTemplate::TYPE_FOUR;}} | ||
| 374 | + else {if ($pageInfo['blog_list'] != 0) {$type = BTemplate::TYPE_FIVE;}}} | ||
| 375 | + if ($source == BTemplate::SOURCE_NEWS) {if ($source_id != 0) {if ($pageInfo['news_details'] != 0) {$type = BTemplate::TYPE_SIX;}} | ||
| 376 | + else {if ($pageInfo['news_list'] != 0) {$type = BTemplate::TYPE_SEVEN;}}} | ||
| 377 | + if ($source == BTemplate::SOURCE_KEYWORD) {if ($pageInfo['polymerization'] != 0) {$type = BTemplate::TYPE_EIGHT;}} | ||
| 375 | } | 378 | } |
| 376 | } | 379 | } |
| 377 | return $type; | 380 | return $type; |
| @@ -494,7 +497,6 @@ class BTemplateLogic extends BaseLogic | @@ -494,7 +497,6 @@ class BTemplateLogic extends BaseLogic | ||
| 494 | * @time :2023/7/27 15:08 | 497 | * @time :2023/7/27 15:08 |
| 495 | */ | 498 | */ |
| 496 | public function getModule($type){ | 499 | public function getModule($type){ |
| 497 | - //获取公共主题头部底部 | ||
| 498 | $mainModel = new TemplateTypeMain(); | 500 | $mainModel = new TemplateTypeMain(); |
| 499 | $info = $mainModel->read(['type'=>$type]); | 501 | $info = $mainModel->read(['type'=>$type]); |
| 500 | return $info['main_html']; | 502 | return $info['main_html']; |
| @@ -99,7 +99,7 @@ class VisualizationLogic extends BaseLogic | @@ -99,7 +99,7 @@ class VisualizationLogic extends BaseLogic | ||
| 99 | $source = $sourceData['source']; | 99 | $source = $sourceData['source']; |
| 100 | $source_id = $sourceData['source_id']; | 100 | $source_id = $sourceData['source_id']; |
| 101 | $type = $this->param['type']; | 101 | $type = $this->param['type']; |
| 102 | - $typeArray = [1,3,5,7];//单页数据 | 102 | + $typeArray = [BTemplate::TYPE_ONE,BTemplate::TYPE_THREE,BTemplate::TYPE_FIVE,BTemplate::TYPE_SEVEN];//所有列表页+首页 |
| 103 | if(in_array($type,$typeArray)){ | 103 | if(in_array($type,$typeArray)){ |
| 104 | $bTemplateModel = new BTemplate(); | 104 | $bTemplateModel = new BTemplate(); |
| 105 | $templateInfo = $bTemplateModel->read(['source'=>$source,'source_id'=>$source_id,'template_id'=>0]); | 105 | $templateInfo = $bTemplateModel->read(['source'=>$source,'source_id'=>$source_id,'template_id'=>0]); |
| @@ -158,6 +158,7 @@ class VisualizationLogic extends BaseLogic | @@ -158,6 +158,7 @@ class VisualizationLogic extends BaseLogic | ||
| 158 | * @time :2023/12/6 11:47 | 158 | * @time :2023/12/6 11:47 |
| 159 | */ | 159 | */ |
| 160 | public function getVisualizationHtml($type){ | 160 | public function getVisualizationHtml($type){ |
| 161 | + | ||
| 161 | if(in_array($type,[1,3,5,7])){//单页 | 162 | if(in_array($type,[1,3,5,7])){//单页 |
| 162 | $templateInfo = $this->getWebTemplate($this->param['source'],$this->param['source_id']);//查看当前定制单页是否有代码块 | 163 | $templateInfo = $this->getWebTemplate($this->param['source'],$this->param['source_id']);//查看当前定制单页是否有代码块 |
| 163 | if($templateInfo === false){ | 164 | if($templateInfo === false){ |
| @@ -22,13 +22,13 @@ class BTemplate extends Base | @@ -22,13 +22,13 @@ class BTemplate extends Base | ||
| 22 | const STATUS = 0; | 22 | const STATUS = 0; |
| 23 | 23 | ||
| 24 | const TYPE_ONE = 1;//首页类型 | 24 | const TYPE_ONE = 1;//首页类型 |
| 25 | - const TYPE_TWO = 2;// | ||
| 26 | - const TYPE_THREE = 3; | ||
| 27 | - const TYPE_FOUR = 4; | ||
| 28 | - const TYPE_FIVE = 5; | ||
| 29 | - const TYPE_SIX = 6; | ||
| 30 | - const TYPE_SEVEN = 7; | ||
| 31 | - const TYPE_EIGHT = 8; | 25 | + const TYPE_TWO = 2;//产品详情 |
| 26 | + const TYPE_THREE = 3;//产品列表 | ||
| 27 | + const TYPE_FOUR = 4;//博客详情 | ||
| 28 | + const TYPE_FIVE = 5;//博客列表 | ||
| 29 | + const TYPE_SIX = 6;//新闻详情 | ||
| 30 | + const TYPE_SEVEN = 7;//新闻列表 | ||
| 31 | + const TYPE_EIGHT = 8;//自定义页面 | ||
| 32 | 32 | ||
| 33 | protected $table = 'gl_web_template'; | 33 | protected $table = 'gl_web_template'; |
| 34 | //连接数据库 | 34 | //连接数据库 |
| @@ -98,5 +98,12 @@ class BTemplate extends Base | @@ -98,5 +98,12 @@ class BTemplate extends Base | ||
| 98 | ], | 98 | ], |
| 99 | ] | 99 | ] |
| 100 | ]; | 100 | ]; |
| 101 | + | ||
| 102 | + public function typeMap() | ||
| 103 | + { | ||
| 104 | + return [ | ||
| 105 | + self::SOURCE_HOME => 'xxxx', | ||
| 106 | + ]; | ||
| 107 | + } | ||
| 101 | } | 108 | } |
| 102 | 109 |
-
请 注册 或 登录 后发表评论