作者 lyh

Merge branch 'master' of http://47.244.231.31:8099/zhl/globalso-v6 into develop

@@ -375,6 +375,8 @@ class BTemplateLogic extends BaseLogic @@ -375,6 +375,8 @@ class BTemplateLogic extends BaseLogic
375 if($source == BTemplate::SOURCE_HOME){ 375 if($source == BTemplate::SOURCE_HOME){
376 $type = 'index'; 376 $type = 'index';
377 $route = ''; 377 $route = '';
  378 + //路由映射
  379 + RouteMap::setRoute('index', RouteMap::SOURCE_PAGE, 0, $this->user['project_id']);
378 }else{ 380 }else{
379 //其他界面通知更新 381 //其他界面通知更新
380 if($source == 2 && $source_id != 0){ 382 if($source == 2 && $source_id != 0){
@@ -110,19 +110,19 @@ class CustomTemplateLogic extends BaseLogic @@ -110,19 +110,19 @@ class CustomTemplateLogic extends BaseLogic
110 * @method :post 110 * @method :post
111 * @time :2023/10/13 14:27 111 * @time :2023/10/13 14:27
112 */ 112 */
113 - public function saveCommonTemplate($param){ 113 + public function saveCommonTemplate($html){
114 $type = $this->getType(); 114 $type = $this->getType();
115 - $templateCommonModel = new BTemplateCommon();  
116 //获取设置的默认模版 115 //获取设置的默认模版
117 $bSettingModel = new Setting(); 116 $bSettingModel = new Setting();
118 $bSettingInfo = $bSettingModel->read(['project_id'=>$this->user['project_id']]); 117 $bSettingInfo = $bSettingModel->read(['project_id'=>$this->user['project_id']]);
  118 + $templateCommonModel = new BTemplateCommon();
119 $info = $templateCommonModel->read(['template_id'=>$bSettingInfo['template_id'],'project_id'=>$this->user['project_id'],'type'=>$type]); 119 $info = $templateCommonModel->read(['template_id'=>$bSettingInfo['template_id'],'project_id'=>$this->user['project_id'],'type'=>$type]);
120 $data = [ 120 $data = [
121 - 'head_html'=>characterTruncation($param['html'],'/<header\b[^>]*>(.*?)<\/header>/s'),  
122 - 'head_css'=>characterTruncation($param['html'],'/<style id="globalsojs-header">(.*?)<\/style>/s'),  
123 - 'footer_html'=>characterTruncation($param['html'],'/<footer\b[^>]*>(.*?)<\/footer>/s'),  
124 - 'footer_css'=>characterTruncation($param['html'],'/<style id="globalsojs-footer">(.*?)<\/style>/s'),  
125 - 'other'=>str_replace('<header','',characterTruncation($param['html'],"/<link id=\"google-fonts-link\"(.*?)<header/s")), 121 + 'head_html'=>characterTruncation($html,'/<header\b[^>]*>(.*?)<\/header>/s'),
  122 + 'head_css'=>characterTruncation($html,'/<style id="globalsojs-header">(.*?)<\/style>/s'),
  123 + 'footer_html'=>characterTruncation($html,'/<footer\b[^>]*>(.*?)<\/footer>/s'),
  124 + 'footer_css'=>characterTruncation($html,'/<style id="globalsojs-footer">(.*?)<\/style>/s'),
  125 + 'other'=>str_replace('<header','',characterTruncation($html,"/<link id=\"google-fonts-link\"(.*?)<header/s")),
126 ]; 126 ];
127 if($info === false){ 127 if($info === false){
128 $data['template_id'] = $bSettingInfo['template_id']; 128 $data['template_id'] = $bSettingInfo['template_id'];