作者 张关杰

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

... ... @@ -54,11 +54,11 @@ class UpdateRoute extends Command
*/
public function handle(){
$projectModel = new Project();
$list = $projectModel->list(['id'=>['in',[518,241]],'is_upgrade'=>0]);
$list = $projectModel->list(['id'=>['in',[183]],'is_upgrade'=>0]);
foreach ($list as $v){
echo date('Y-m-d H:i:s') . 'project_id:'.$v['id'] . PHP_EOL;
ProjectServer::useProject($v['id']);
$this->getProduct();
// $this->getProduct();
$this->setProductKeyword();
DB::disconnect('custom_mysql');
}
... ...
... ... @@ -285,25 +285,9 @@ class CustomTemplateLogic extends BaseLogic
}
//获取type类型
$commonInfo = $this->getCommonPage($info['template_id']);
$html = '';
if($commonInfo !== false){
$html = $commonInfo['head_css'].$html_style.$commonInfo['footer_css'].$commonInfo['other'].
$commonInfo['head_html'].$preg_html.$commonInfo['footer_html'];
}else{
//兼容老数据,获取首页数据
$TemplateInfo = (new BTemplate())->read([
'template_id'=>$info['template_id'],
'source'=>1,
'project_id'=>$this->user['project_id'],
'source_id'=>0,
]);;
if($TemplateInfo !== false){
$html = preg_replace('/<style id="globalsojs-styles">(.*?)<\/style>/s',$html_style , $TemplateInfo['html']);
//内容
$html = preg_replace('/<main\b[^>]*>(.*?)<\/main>/s', $preg_html, $html);
}
}
return $html;
$html = $commonInfo['head_css'].$html_style.$commonInfo['footer_css'].$commonInfo['other'].
$commonInfo['head_html'].$preg_html.$commonInfo['footer_html'];
return $this->success($html);
}
/**
... ...
... ... @@ -142,6 +142,9 @@ class KeywordLogic extends BaseLogic
}
try {
foreach ($this->param['title'] as $k=>$v){
if(empty($v)){
continue;
}
$this->model = new Keyword();
$info = $this->model->read(['title'=>$v]);
if($info === false){
... ...