|
...
|
...
|
@@ -5,6 +5,8 @@ namespace App\Http\Logic\Bside\BTemplate; |
|
|
|
use App\Http\Logic\Bside\BaseLogic;
|
|
|
|
use App\Models\Service\Service as ServiceSettingModel;
|
|
|
|
use App\Models\Template\BCustomTemplate;
|
|
|
|
use App\Models\Template\BSetting;
|
|
|
|
use App\Models\Template\Template;
|
|
|
|
|
|
|
|
class CustomTemplateLogic extends BaseLogic
|
|
|
|
{
|
|
...
|
...
|
@@ -38,7 +40,10 @@ class CustomTemplateLogic extends BaseLogic |
|
|
|
*/
|
|
|
|
public function customTemplateInfo(){
|
|
|
|
$info = $this->model->read(['id'=>$this->param['id']]);
|
|
|
|
$info['html'] = $this->getHeadFooter();
|
|
|
|
if(!empty($info['html'])){
|
|
|
|
$html = $this->getBodyHeaderFooter();
|
|
|
|
$info['html'] = $this->getHeadFooter($html);
|
|
|
|
}
|
|
|
|
if($info === false){
|
|
|
|
$this->fail('error');
|
|
|
|
}
|
|
...
|
...
|
@@ -84,6 +89,25 @@ class CustomTemplateLogic extends BaseLogic |
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :获取body的详情
|
|
|
|
* @name :getBodyHeaderFooter
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2023/7/21 18:08
|
|
|
|
*/
|
|
|
|
public function getBodyHeaderFooter(){
|
|
|
|
$html = '';
|
|
|
|
//获取设置的默认模版
|
|
|
|
$bSettingModel = new BSetting();
|
|
|
|
$info = $bSettingModel->read(['project_id'=>$this->user['project_id']]);
|
|
|
|
//获取模板详情
|
|
|
|
$ATemplateModel = new Template();
|
|
|
|
$TemplateInfo = $ATemplateModel->read(['id'=>$info['template_id']]);
|
|
|
|
$html = $html.$TemplateInfo['head_css'].$TemplateInfo['footer_css'].$TemplateInfo['head_html'].$TemplateInfo['footer_html'];
|
|
|
|
return $html;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :拼接获取公共头部底部
|
|
|
|
* @name :getHeadFooter
|
|
|
|
* @author :lyh
|
...
|
...
|
|