|
...
|
...
|
@@ -111,12 +111,12 @@ class CustomTemplateLogic extends BaseLogic |
|
|
|
$this->saveCommonTemplate($html,$bSettingInfo['template_id']);
|
|
|
|
$this->param['html'] = characterTruncation($html,'/<main\b[^>]*>(.*?)<\/main>/s');
|
|
|
|
$this->param['html_style'] = characterTruncation($html,'/<style id="globalsojs-styles">(.*?)<\/style>/s');
|
|
|
|
$this->setTemplateLog($bSettingInfo['template_id'],$html,$this->param['id']);
|
|
|
|
}
|
|
|
|
$rs = $this->model->edit($this->param,['id'=>$this->param['id'],'project_id'=>$this->user['project_id']]);
|
|
|
|
if($rs === false){
|
|
|
|
$this->fail('系统错误,请联系管理');
|
|
|
|
}
|
|
|
|
$this->setTemplateLog($info,$bSettingInfo['template_id'],$html,$this->param['id']);
|
|
|
|
//通知
|
|
|
|
$this->addUpdateNotify(RouteMap::SOURCE_PAGE,$info['url']);
|
|
|
|
$this->curlDelRoute(['route'=>$info['url'],'new_route'=>$info['url']]);
|
|
...
|
...
|
@@ -391,8 +391,11 @@ class CustomTemplateLogic extends BaseLogic |
|
|
|
];
|
|
|
|
$commonTemplateModel = new BTemplateCommon();
|
|
|
|
$commonTemplateModel->edit($commonData,['template_id'=>$logInfo['template_id'],'type'=>$type,'project_id'=>$this->user['project_id']]);
|
|
|
|
$this->model->edit(['html'=>$logInfo['main_html'],'html_style'=>$logInfo['main_css']],['id'=>$logInfo['source_id']]);
|
|
|
|
}else{
|
|
|
|
$this->model->edit(['html'=>$logInfo['text']],['id'=>$logInfo['source_id']]);
|
|
|
|
}
|
|
|
|
$this->model->edit(['html'=>$logInfo['main_html'],'html_style'=>$logInfo['main_css']],['id'=>$logInfo['source_id']]);
|
|
|
|
|
|
|
|
return $this->success();
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|