作者 刘锟

Merge remote-tracking branch 'origin/master' into akun

@@ -85,7 +85,7 @@ class BTemplateLogic extends BaseLogic @@ -85,7 +85,7 @@ class BTemplateLogic extends BaseLogic
85 }else{ 85 }else{
86 if($templateInfo['type'] == BTemplate::ALL_HTML){//返回整个html代码 86 if($templateInfo['type'] == BTemplate::ALL_HTML){//返回整个html代码
87 $type = $this->getCustomizedType($source, $source_id);//定制获取头部底部类型 87 $type = $this->getCustomizedType($source, $source_id);//定制获取头部底部类型
88 - $commonInfo = $this->getCommonPage(0,$this->user['project_id'],$type);//获取定制头部 88 + $commonInfo = $this->getCommonPage($type,$this->user['project_id'],0);//获取定制头部
89 $html = $this->handleAllHtml($commonInfo,$templateInfo['html']); 89 $html = $this->handleAllHtml($commonInfo,$templateInfo['html']);
90 return $this->success(['html'=>$html,'template_id'=>$template_id,'id'=>$templateInfo['id']]); 90 return $this->success(['html'=>$html,'template_id'=>$template_id,'id'=>$templateInfo['id']]);
91 } 91 }
@@ -136,6 +136,10 @@ class BTemplateLogic extends BaseLogic @@ -136,6 +136,10 @@ class BTemplateLogic extends BaseLogic
136 if($customHtmlInfo === false){ 136 if($customHtmlInfo === false){
137 $this->fail('定制页面,请先上传代码块'); 137 $this->fail('定制页面,请先上传代码块');
138 } 138 }
  139 + $commonInfo = $this->getCommonPage($type,$this->user['project_id'],0);//获取定制头部
  140 + if($commonInfo !== false){
  141 + $customHtmlInfo['main_html'] = $this->handleAllHtml($commonInfo,$customHtmlInfo['main_html']);
  142 + }
139 return $customHtmlInfo['main_html']; 143 return $customHtmlInfo['main_html'];
140 } 144 }
141 return []; 145 return [];
@@ -58,7 +58,7 @@ class KeywordLogic extends BaseLogic @@ -58,7 +58,7 @@ class KeywordLogic extends BaseLogic
58 if(isset($this->param['id']) && !empty($this->param['id'])){ 58 if(isset($this->param['id']) && !empty($this->param['id'])){
59 //TODO::不能修改路由 59 //TODO::不能修改路由
60 $this->model->edit($this->param,['id'=>$this->param['id']]); 60 $this->model->edit($this->param,['id'=>$this->param['id']]);
61 - $route = $this->param['route']; 61 + $route = RouteMap::getRoute(RouteMap::SOURCE_PRODUCT_KEYWORD,$this->param['id'], $this->user['project_id']);
62 }else{ 62 }else{
63 $this->param = $this->addHandleParam($this->param); 63 $this->param = $this->addHandleParam($this->param);
64 $id = $this->model->insertGetId($this->param); 64 $id = $this->model->insertGetId($this->param);