|
...
|
...
|
@@ -66,6 +66,7 @@ class BTemplateLogic extends BaseLogic |
|
|
|
//获取模板详情
|
|
|
|
$ATemplateModel = new Template();
|
|
|
|
$TemplateInfo = $ATemplateModel->read(['id'=>$info['template_id']]);
|
|
|
|
$TemplateInfo['html'] = $this->getHeadFooter($TemplateInfo['html']);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return $this->success($TemplateInfo);
|
|
...
|
...
|
@@ -143,19 +144,31 @@ class BTemplateLogic extends BaseLogic |
|
|
|
//同步数据
|
|
|
|
$this->param['name'] = $TemplateInfo['name'];
|
|
|
|
$this->param['image'] = $TemplateInfo['image'];
|
|
|
|
$this->getHeadFooter(characterTruncation($this->param['html'],'/<style id="vvvebjs-header">(.*?)<\/footer>/s'));
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :拼接获取公共头部底部
|
|
|
|
* @name :getHeadFooter
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2023/7/21 17:22
|
|
|
|
*/
|
|
|
|
public function getHeadFooter($html){
|
|
|
|
//获取公共主题头部底部
|
|
|
|
$serviceSettingModel = new ServiceSettingModel();
|
|
|
|
$list = $serviceSettingModel->list(['type'=>2],'created_at');
|
|
|
|
//拼接html
|
|
|
|
foreach ($list as $k => $v){
|
|
|
|
foreach ($list as $v){
|
|
|
|
if($v['key'] == 'head'){
|
|
|
|
$this->param['html'] = $v['values'].$this->param['html'];
|
|
|
|
$html = $v['values'].$html;
|
|
|
|
}
|
|
|
|
if($v['key'] == 'footer'){
|
|
|
|
$this->param['html'] = $this->param['html'].$v['values'];
|
|
|
|
$html = $html.$v['values'];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
return $html;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
...
|
...
|
@@ -173,6 +186,8 @@ class BTemplateLogic extends BaseLogic |
|
|
|
$this->param['footer_css'] = characterTruncation($this->param['html'],'/<style id="vvvebjs-footer">(.*?)<\/style>/s');
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :获取类型
|
|
|
|
* @name :getModuleType
|
...
|
...
|
|