作者 lyh

gx

... ... @@ -227,6 +227,7 @@ class BTemplateLogic extends BaseLogic
$templateCommonModel = new BTemplateCommon();
$info = $templateCommonModel->read(['template_id'=>$param['template_id'],'project_id'=>$this->user['project_id']]);
$pattern = '/<link id="google-fonts-link"[^<]*<header/';
@file_put_contents(storage_path('logs/lyh_error.log'), var_export($param['html'], true) . PHP_EOL, FILE_APPEND);
if (preg_match($pattern, $param['html'], $matches)) {
$result = $matches[0];
@file_put_contents(storage_path('logs/lyh_error.log'), var_export($result, true) . PHP_EOL, FILE_APPEND);
... ... @@ -308,7 +309,6 @@ class BTemplateLogic extends BaseLogic
*/
public function templateSaveParam($param){
$param['project_id'] = $this->user['project_id'];
$param['html'] = $param['main_html'];
return $this->success($param);
}
... ...