作者 Your Name
... ... @@ -31,7 +31,7 @@ class CustomTemplateLogic extends BaseLogic
* @time :2023/6/29 15:46
*/
public function customTemplateLists($map,$page,$row,$order = 'created_at'){
$filed = ['id','name','status','url','title','keywords','description','project_id','is_upgrade','six_read','is_visualization','created_at','updated_at'];
$filed = ['id','name','status','url','operator_id','title','keywords','description','project_id','is_upgrade','six_read','is_visualization','created_at','updated_at'];
$map['deleted_status'] = 0;
$map['project_id'] = $this->user['project_id'];
$lists = $this->model->lists($map,$page,$row,$order,$filed);
... ... @@ -137,13 +137,7 @@ class CustomTemplateLogic extends BaseLogic
* @time :2023/6/29 16:21
*/
public function customTemplateSave(){
$this->param['url'] = str_replace_url($this->param['url']);
if(($this->project['deploy_build']['is_search'] == 0) && ($this->param['url'] == 'search')){
$this->fail('请先开启搜索页可视化');
}
if(($this->project['deploy_build']['is_keyword'] == 0) && ($this->param['url'] == 'keyword')){
$this->fail('请先开启聚合页可视化');
}
$this->param = $this->handleSaveParam();;
if(isset($this->param['id']) && !empty($this->param['id'])){
$id = $this->param['id'];
$is_upgrade = $this->param['is_upgrade'] ?? 0;//1:5.0数据 0:6.0
... ... @@ -181,6 +175,25 @@ class CustomTemplateLogic extends BaseLogic
}
/**
* @remark :参数验证
* @name :handleSaveParam
* @author :lyh
* @method :post
* @time :2024/8/6 16:52
*/
public function handleSaveParam(){
$this->param['url'] = str_replace_url($this->param['url']);
$this->param['operator_id'] = $this->user['id'];
if(($this->project['deploy_build']['is_search'] == 0) && ($this->param['url'] == 'search')){
$this->fail('请先开启搜索页可视化');
}
if(($this->project['deploy_build']['is_keyword'] == 0) && ($this->param['url'] == 'keyword')){
$this->fail('请先开启聚合页可视化');
}
return $this->success($this->param);
}
/**
* @remark :可视化保存html
* @name :saveHtml
* @author :lyh
... ...
... ... @@ -240,10 +240,8 @@ class CustomModuleContentLogic extends BaseLogic
{
//生成一条删除路由记录
$info = $this->model->read(['id' => $id], ['id', 'route']);
if ($info['route'] != $route) {
$this->addUpdateNotify(RouteMap::SOURCE_MODULE,$route);
$this->curlDelRoute(['route'=>$info['route'],'new_route'=>$route]);
}
$this->addUpdateNotify(RouteMap::SOURCE_MODULE,$route);
$this->curlDelRoute(['route'=>$info['route'],'new_route'=>$route]);
return true;
}
... ...