正在显示
1 个修改的文件
包含
29 行增加
和
0 行删除
| @@ -404,4 +404,33 @@ class CustomTemplateLogic extends BaseLogic | @@ -404,4 +404,33 @@ class CustomTemplateLogic extends BaseLogic | ||
| 404 | } | 404 | } |
| 405 | return $this->success(); | 405 | return $this->success(); |
| 406 | } | 406 | } |
| 407 | + | ||
| 408 | + /** | ||
| 409 | + * @remark :复制单页面 | ||
| 410 | + * @name :copyCustomTemplateInfo | ||
| 411 | + * @author :lyh | ||
| 412 | + * @method :post | ||
| 413 | + * @time :2024/5/24 14:47 | ||
| 414 | + */ | ||
| 415 | + public function copyCustomTemplateInfo(){ | ||
| 416 | + $info = $this->model->read(['id'=>$this->param['id']]); | ||
| 417 | + if($info === false){ | ||
| 418 | + $this->fail('当前数据不存在'); | ||
| 419 | + } | ||
| 420 | + $param = [ | ||
| 421 | + 'name'=>$info['name'].'-copy', | ||
| 422 | + 'status'=>$info['status'], | ||
| 423 | + 'url'=>$info['url'].'-copy', | ||
| 424 | + 'html'=>$info['html'], | ||
| 425 | + 'html_style'=>$info['html_style'], | ||
| 426 | + 'project_id'=>$info['project_id'], | ||
| 427 | + 'is_visualization'=>$info['is_visualization'], | ||
| 428 | + 'six_read'=>$info['six_read'], | ||
| 429 | + 'is_upgrade'=>$info['is_upgrade'], | ||
| 430 | + ]; | ||
| 431 | + $id = $this->model->addReturnId($param); | ||
| 432 | + $route = RouteMap::setRoute($param['url'],RouteMap::SOURCE_PAGE,$id,$param['project_id']); | ||
| 433 | + $this->model->edit(['url'=>$route],['id'=>$id]); | ||
| 434 | + return $this->success(); | ||
| 435 | + } | ||
| 407 | } | 436 | } |
-
请 注册 或 登录 后发表评论