|
...
|
...
|
@@ -193,8 +193,8 @@ class BTemplateLogic extends BaseLogic |
|
|
|
$this->fail('演示项目仅支持演示功能,无法更改首页');
|
|
|
|
}
|
|
|
|
//查询当前模版是否已保存
|
|
|
|
// DB::beginTransaction();
|
|
|
|
// try {
|
|
|
|
DB::beginTransaction();
|
|
|
|
try {
|
|
|
|
$info = $this->webTemplateInfo($this->param['template_id'],$this->param['source'],$this->param['source_id']);
|
|
|
|
//字符串截取
|
|
|
|
$this->param = $this->stringProcessing($this->param);
|
|
...
|
...
|
@@ -206,11 +206,11 @@ class BTemplateLogic extends BaseLogic |
|
|
|
}
|
|
|
|
$this->saveCommonTemplate($this->param);
|
|
|
|
$this->setTemplateLog($this->param);
|
|
|
|
// DB::commit();
|
|
|
|
// }catch (\Exception $e){
|
|
|
|
// DB::rollBack();
|
|
|
|
// $this->fail('error');
|
|
|
|
// }
|
|
|
|
DB::commit();
|
|
|
|
}catch (\Exception $e){
|
|
|
|
DB::rollBack();
|
|
|
|
$this->fail('系统错误,请联系管理员');
|
|
|
|
}
|
|
|
|
//通知更新
|
|
|
|
$this->homeOrProduct($this->param['source'],$this->param['source_id']);
|
|
|
|
return $this->success();
|
|
...
|
...
|
@@ -231,7 +231,7 @@ class BTemplateLogic extends BaseLogic |
|
|
|
'head_css'=>$param['head_css'],
|
|
|
|
'footer_html'=>$param['footer_html'],
|
|
|
|
'footer_css'=>$param['footer_css'],
|
|
|
|
'other'=>str_replace('header','',characterTruncation($param['html'],'/<link id="google-fonts-link">(.*?)header/s')),
|
|
|
|
'other'=>str_replace('<header','',characterTruncation($param['html'],'/<link id="google-fonts-link"\b[^>]*>(.*?)header/s')),
|
|
|
|
];
|
|
|
|
if($info === false){
|
|
|
|
$data['template_id'] = $param['template_id'];
|
...
|
...
|
|