作者 lyh

gx

... ... @@ -71,9 +71,6 @@ class CustomTemplateLogic extends BaseLogic
}catch (\Exception $e){
$this->fail('error');
}
//TODO::通知网站更新
$data = ['project_id'=>$this->user['project_id'], 'type'=>RouteMap::SOURCE_PAGE, 'route'=>$route];
$this->updateNotify($data);
return $this->success();
}
... ... @@ -88,7 +85,15 @@ class CustomTemplateLogic extends BaseLogic
$html = $this->param['html'];
$this->param['html'] = characterTruncation($html,'/<main>(.*?)<\/main>/s');
$this->param['html_style'] = characterTruncation($html,'/<style id="globalsojs-styles">(.*?)<\/style>/s');
$this->model->edit($this->param,['id'=>$this->param['id']]);
$rs = $this->model->edit($this->param,['id'=>$this->param['id']]);
if($rs === false){
$this->fail('系统错误,请联系管理');
}
//TODO::通知网站更新
$info = $this->model->read(['id'=>$this->param['id']],['id','url']);
$data = ['project_id'=>$this->user['project_id'], 'type'=>RouteMap::SOURCE_PAGE, 'route'=>$info['url']];
$this->updateNotify($data);
return $this->success();
}
/**
... ...