|
...
|
...
|
@@ -404,4 +404,33 @@ class CustomTemplateLogic extends BaseLogic |
|
|
|
}
|
|
|
|
return $this->success();
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :复制单页面
|
|
|
|
* @name :copyCustomTemplateInfo
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2024/5/24 14:47
|
|
|
|
*/
|
|
|
|
public function copyCustomTemplateInfo(){
|
|
|
|
$info = $this->model->read(['id'=>$this->param['id']]);
|
|
|
|
if($info === false){
|
|
|
|
$this->fail('当前数据不存在');
|
|
|
|
}
|
|
|
|
$param = [
|
|
|
|
'name'=>$info['name'].'-copy',
|
|
|
|
'status'=>$info['status'],
|
|
|
|
'url'=>$info['url'].'-copy',
|
|
|
|
'html'=>$info['html'],
|
|
|
|
'html_style'=>$info['html_style'],
|
|
|
|
'project_id'=>$info['project_id'],
|
|
|
|
'is_visualization'=>$info['is_visualization'],
|
|
|
|
'six_read'=>$info['six_read'],
|
|
|
|
'is_upgrade'=>$info['is_upgrade'],
|
|
|
|
];
|
|
|
|
$id = $this->model->addReturnId($param);
|
|
|
|
$route = RouteMap::setRoute($param['url'],RouteMap::SOURCE_PAGE,$id,$param['project_id']);
|
|
|
|
$this->model->edit(['url'=>$route],['id'=>$id]);
|
|
|
|
return $this->success(['id'=>$id]);
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|