Merge branch 'master' of http://47.244.231.31:8099/zhl/globalso-v6 into master-server
正在显示
3 个修改的文件
包含
19 行增加
和
17 行删除
| @@ -55,13 +55,13 @@ class UpdateRoute extends Command | @@ -55,13 +55,13 @@ class UpdateRoute extends Command | ||
| 55 | */ | 55 | */ |
| 56 | public function handle(){ | 56 | public function handle(){ |
| 57 | $projectModel = new Project(); | 57 | $projectModel = new Project(); |
| 58 | - $list = $projectModel->list(['id'=>['in',[802]]]); | 58 | + $list = $projectModel->list(['id'=>['in',[147]]]); |
| 59 | $data = []; | 59 | $data = []; |
| 60 | foreach ($list as $v){ | 60 | foreach ($list as $v){ |
| 61 | echo date('Y-m-d H:i:s') . 'project_id:'.$v['id'] . PHP_EOL; | 61 | echo date('Y-m-d H:i:s') . 'project_id:'.$v['id'] . PHP_EOL; |
| 62 | ProjectServer::useProject($v['id']); | 62 | ProjectServer::useProject($v['id']); |
| 63 | -// $this->getProduct(); | ||
| 64 | - $this->setProductKeyword(); | 63 | + $this->getProduct(); |
| 64 | +// $this->setProductKeyword(); | ||
| 65 | // $this->getBlog(); | 65 | // $this->getBlog(); |
| 66 | DB::disconnect('custom_mysql'); | 66 | DB::disconnect('custom_mysql'); |
| 67 | } | 67 | } |
| @@ -215,7 +215,7 @@ class UpdateRoute extends Command | @@ -215,7 +215,7 @@ class UpdateRoute extends Command | ||
| 215 | 215 | ||
| 216 | public function getProduct(){ | 216 | public function getProduct(){ |
| 217 | $productModel = new Product(); | 217 | $productModel = new Product(); |
| 218 | - $lists = $productModel->list(['status'=>1,'id'=>['<=',501]]); | 218 | + $lists = $productModel->list(['status'=>2]); |
| 219 | if(!empty($lists)){ | 219 | if(!empty($lists)){ |
| 220 | foreach ($lists as $v){ | 220 | foreach ($lists as $v){ |
| 221 | if(!empty($v['route'])){ | 221 | if(!empty($v['route'])){ |
| @@ -227,14 +227,15 @@ class UpdateRoute extends Command | @@ -227,14 +227,15 @@ class UpdateRoute extends Command | ||
| 227 | $route = RouteMap::setRoute($route, RouteMap::SOURCE_PRODUCT, $v['id'], $v['project_id']); | 227 | $route = RouteMap::setRoute($route, RouteMap::SOURCE_PRODUCT, $v['id'], $v['project_id']); |
| 228 | $productModel->edit(['route'=>$route],['id'=>$v['id']]); | 228 | $productModel->edit(['route'=>$route],['id'=>$v['id']]); |
| 229 | }else{ | 229 | }else{ |
| 230 | -// echo date('Y-m-d H:i:s') . 'id :'.$v['id'] . PHP_EOL; | ||
| 231 | -// $route = RouteMap::setRoute($v['title'], RouteMap::SOURCE_PRODUCT, $v['id'], $v['project_id']); | ||
| 232 | -// $productModel->edit(['route'=>$route],['id'=>$v['id']]); | 230 | + echo date('Y-m-d H:i:s') . 'id :'.$v['id'] . PHP_EOL; |
| 231 | + $route = RouteMap::setRoute($v['title'], RouteMap::SOURCE_PRODUCT, $v['id'], $v['project_id']); | ||
| 232 | + $productModel->edit(['route'=>$route],['id'=>$v['id']]); | ||
| 233 | } | 233 | } |
| 234 | continue; | 234 | continue; |
| 235 | }else{ | 235 | }else{ |
| 236 | echo date('Y-m-d H:i:s') . 'id :'.$v['id'] . PHP_EOL; | 236 | echo date('Y-m-d H:i:s') . 'id :'.$v['id'] . PHP_EOL; |
| 237 | $v['title'] = Translate::tran($v['title'], 'en'); | 237 | $v['title'] = Translate::tran($v['title'], 'en'); |
| 238 | + $v['title'] = str_replace('.','',$v['title']).'-product'; | ||
| 238 | $route = RouteMap::setRoute($v['title'], RouteMap::SOURCE_PRODUCT, $v['id'], $v['project_id']); | 239 | $route = RouteMap::setRoute($v['title'], RouteMap::SOURCE_PRODUCT, $v['id'], $v['project_id']); |
| 239 | $productModel->edit(['route'=>$route],['id'=>$v['id']]); | 240 | $productModel->edit(['route'=>$route],['id'=>$v['id']]); |
| 240 | } | 241 | } |
| @@ -31,7 +31,8 @@ class ExtensionModuleLogic extends BaseLogic | @@ -31,7 +31,8 @@ class ExtensionModuleLogic extends BaseLogic | ||
| 31 | * @time :2024/8/7 15:50 | 31 | * @time :2024/8/7 15:50 |
| 32 | */ | 32 | */ |
| 33 | public function saveExtensionModule(){ | 33 | public function saveExtensionModule(){ |
| 34 | - ProjectServer::useProject($this->map['project_id']); | 34 | + ProjectServer::useProject($this->param['project_id']); |
| 35 | + unset($this->param['project_id']); | ||
| 35 | $this->model = new ExtensionModule(); | 36 | $this->model = new ExtensionModule(); |
| 36 | //查看数据是否存在 | 37 | //查看数据是否存在 |
| 37 | if(isset($this->param['id']) && !empty($this->param['id'])){ | 38 | if(isset($this->param['id']) && !empty($this->param['id'])){ |
| @@ -61,7 +62,8 @@ class ExtensionModuleLogic extends BaseLogic | @@ -61,7 +62,8 @@ class ExtensionModuleLogic extends BaseLogic | ||
| 61 | * @time :2024/8/7 16:07 | 62 | * @time :2024/8/7 16:07 |
| 62 | */ | 63 | */ |
| 63 | public function delExtensionModule(){ | 64 | public function delExtensionModule(){ |
| 64 | - ProjectServer::useProject($this->map['project_id']); | 65 | + ProjectServer::useProject($this->param['project_id']); |
| 66 | + unset($this->param['project_id']); | ||
| 65 | $moduleFiledModel = new ExtensionModuleField(); | 67 | $moduleFiledModel = new ExtensionModuleField(); |
| 66 | $info = $moduleFiledModel->read(['module_id'=>$this->param['id']]); | 68 | $info = $moduleFiledModel->read(['module_id'=>$this->param['id']]); |
| 67 | if($info !== false){ | 69 | if($info !== false){ |
| @@ -478,15 +478,14 @@ class CustomTemplateLogic extends BaseLogic | @@ -478,15 +478,14 @@ class CustomTemplateLogic extends BaseLogic | ||
| 478 | //获取当前数据详情 | 478 | //获取当前数据详情 |
| 479 | $info = $this->model->read(['id'=>$logInfo['source_id']],['is_visualization']); | 479 | $info = $this->model->read(['id'=>$logInfo['source_id']],['is_visualization']); |
| 480 | if($info['is_visualization'] == 0 || $info['is_visualization'] == 1){ | 480 | if($info['is_visualization'] == 0 || $info['is_visualization'] == 1){ |
| 481 | - //还原头部底部 | ||
| 482 | - $type = $this->getType(); | ||
| 483 | //还原头部+底部 | 481 | //还原头部+底部 |
| 484 | - $commonData = [ | ||
| 485 | - 'head_html'=>$logInfo['head_html'], 'head_css'=>$logInfo['head_css'], | ||
| 486 | - 'footer_html'=>$logInfo['footer_html'], 'footer_css'=>$logInfo['footer_css'] | ||
| 487 | - ]; | ||
| 488 | - $commonTemplateModel = new BTemplateCommon(); | ||
| 489 | - $commonTemplateModel->edit($commonData,['template_id'=>$logInfo['template_id'],'type'=>$type,'project_id'=>$this->user['project_id']]); | 482 | + $comTemplateModel = new BTemplateCom(); |
| 483 | + //还原头部底部 | ||
| 484 | + $header_type = $this->getType(BTemplate::COMMON_HEAD); | ||
| 485 | + $comTemplateModel->edit(['html'=>$logInfo['other']],['template_id'=>$logInfo['template_id'],'source'=>$header_type,'project_id'=>$this->user['project_id'],'common_type'=>BTemplate::COMMON_OTHER]); | ||
| 486 | + $comTemplateModel->edit(['html'=>$logInfo['head_html'], 'html_style'=>$logInfo['head_css']],['template_id'=>$logInfo['template_id'],'source'=>$header_type,'project_id'=>$this->user['project_id'],'common_type'=>BTemplate::COMMON_HEAD]); | ||
| 487 | + $footer_type = $this->getType(BTemplate::COMMON_FOOTER); | ||
| 488 | + $comTemplateModel->edit(['html'=>$logInfo['footer_html'], 'html_style'=>$logInfo['footer_css']],['template_id'=>$logInfo['template_id'],'source'=>$footer_type,'project_id'=>$this->user['project_id'],'common_type'=>BTemplate::COMMON_FOOTER]); | ||
| 490 | $this->model->edit(['html'=>$logInfo['main_html'],'html_style'=>$logInfo['main_css']],['id'=>$logInfo['source_id']]); | 489 | $this->model->edit(['html'=>$logInfo['main_html'],'html_style'=>$logInfo['main_css']],['id'=>$logInfo['source_id']]); |
| 491 | }else{ | 490 | }else{ |
| 492 | $this->model->edit(['html'=>$logInfo['text']],['id'=>$logInfo['source_id']]); | 491 | $this->model->edit(['html'=>$logInfo['text']],['id'=>$logInfo['source_id']]); |
-
请 注册 或 登录 后发表评论