作者 lyh

gx

... ... @@ -102,7 +102,7 @@ class MailController extends BaseController
$arr[] = $v['mail_id'];
}
$mailModel = new MailModel();
$mail_list = $mailModel->list(['id'=>['not in',$arr]]);
$mail_list = $mailModel->list(['id'=>['not in',$arr],'user_id'=>['like',','.$this->user['id'].',']]);
$data = [];
foreach ($mail_list as $k => $v){
$data[] = [
... ...
... ... @@ -309,7 +309,7 @@ class BTemplateLogic extends BaseLogic
$param['is_custom'] = 0;
}
$info = $this->webTemplateInfo($this->param['template_id'],$param['source'],$param['source_id'],$param['is_custom']);
if($param['is_custom'] != 0){//TODO::自定义默认默认取首页的头部底部
if($param['is_custom'] != 0){//TODO::自定义默认默认取首页的头部底部,不需要保存头部底部
$this->saveCommonTemplate($param);
}
$param['project_id'] = $this->user['project_id'];
... ... @@ -368,10 +368,13 @@ class BTemplateLogic extends BaseLogic
$pageSettingModel = new PageSetting();
$pageInfo = $pageSettingModel->read(['project_id' => $this->user['project_id']]);
if ($pageInfo !== false) {
if ($source == 2) {if ($source_id != 0) {if ($pageInfo['product_details'] != 0) {$type = 2;}} else {if ($pageInfo['product_list'] != 0) {$type = 3;}}}
if ($source == 3) {if ($source_id != 0) {if ($pageInfo['blog_details'] != 0) {$type = 4;}} else {if ($pageInfo['blog_list'] != 0) {$type = 5;}}}
if ($source == 4) {if ($source_id != 0) {if ($pageInfo['news_details'] != 0) {$type = 6;}} else {if ($pageInfo['news_list'] != 0) {$type = 7;}}}
if ($source == 5) {if ($pageInfo['polymerization'] != 0) {$type = 8;}}
if ($source == BTemplate::SOURCE_PRODUCT) {if ($source_id != 0) {if ($pageInfo['product_details'] != 0) {$type = BTemplate::TYPE_TWO;}}
else {if ($pageInfo['product_list'] != 0) {$type = BTemplate::TYPE_THREE;}}}
if ($source == BTemplate::SOURCE_BLOG) {if ($source_id != 0) {if ($pageInfo['blog_details'] != 0) {$type = BTemplate::TYPE_FOUR;}}
else {if ($pageInfo['blog_list'] != 0) {$type = BTemplate::TYPE_FIVE;}}}
if ($source == BTemplate::SOURCE_NEWS) {if ($source_id != 0) {if ($pageInfo['news_details'] != 0) {$type = BTemplate::TYPE_SIX;}}
else {if ($pageInfo['news_list'] != 0) {$type = BTemplate::TYPE_SEVEN;}}}
if ($source == BTemplate::SOURCE_KEYWORD) {if ($pageInfo['polymerization'] != 0) {$type = BTemplate::TYPE_EIGHT;}}
}
}
return $type;
... ... @@ -494,7 +497,6 @@ class BTemplateLogic extends BaseLogic
* @time :2023/7/27 15:08
*/
public function getModule($type){
//获取公共主题头部底部
$mainModel = new TemplateTypeMain();
$info = $mainModel->read(['type'=>$type]);
return $info['main_html'];
... ...
... ... @@ -99,7 +99,7 @@ class VisualizationLogic extends BaseLogic
$source = $sourceData['source'];
$source_id = $sourceData['source_id'];
$type = $this->param['type'];
$typeArray = [1,3,5,7];//单页数据
$typeArray = [BTemplate::TYPE_ONE,BTemplate::TYPE_THREE,BTemplate::TYPE_FIVE,BTemplate::TYPE_SEVEN];//所有列表页+首页
if(in_array($type,$typeArray)){
$bTemplateModel = new BTemplate();
$templateInfo = $bTemplateModel->read(['source'=>$source,'source_id'=>$source_id,'template_id'=>0]);
... ... @@ -158,6 +158,7 @@ class VisualizationLogic extends BaseLogic
* @time :2023/12/6 11:47
*/
public function getVisualizationHtml($type){
if(in_array($type,[1,3,5,7])){//单页
$templateInfo = $this->getWebTemplate($this->param['source'],$this->param['source_id']);//查看当前定制单页是否有代码块
if($templateInfo === false){
... ...
... ... @@ -22,13 +22,13 @@ class BTemplate extends Base
const STATUS = 0;
const TYPE_ONE = 1;//首页类型
const TYPE_TWO = 2;//
const TYPE_THREE = 3;
const TYPE_FOUR = 4;
const TYPE_FIVE = 5;
const TYPE_SIX = 6;
const TYPE_SEVEN = 7;
const TYPE_EIGHT = 8;
const TYPE_TWO = 2;//产品详情
const TYPE_THREE = 3;//产品列表
const TYPE_FOUR = 4;//博客详情
const TYPE_FIVE = 5;//博客列表
const TYPE_SIX = 6;//新闻详情
const TYPE_SEVEN = 7;//新闻列表
const TYPE_EIGHT = 8;//自定义页面
protected $table = 'gl_web_template';
//连接数据库
... ... @@ -98,5 +98,12 @@ class BTemplate extends Base
],
]
];
public function typeMap()
{
return [
self::SOURCE_HOME => 'xxxx',
];
}
}
... ...