正在显示
3 个修改的文件
包含
39 行增加
和
3 行删除
| @@ -40,6 +40,23 @@ class ServerConfigController extends BaseController | @@ -40,6 +40,23 @@ class ServerConfigController extends BaseController | ||
| 40 | } | 40 | } |
| 41 | 41 | ||
| 42 | /** | 42 | /** |
| 43 | + * @remark :获取数据详情 | ||
| 44 | + * @name :info | ||
| 45 | + * @author :lyh | ||
| 46 | + * @method :post | ||
| 47 | + * @time :2023/8/2 17:52 | ||
| 48 | + */ | ||
| 49 | + public function info(ServerConfigLogic $logic){ | ||
| 50 | + $this->request->validate([ | ||
| 51 | + 'id'=>'required' | ||
| 52 | + ],[ | ||
| 53 | + 'id.required' => 'ID不能为空' | ||
| 54 | + ]); | ||
| 55 | + $info = $logic->getServiceConfig(); | ||
| 56 | + $this->response('success',Code::SUCCESS,$info); | ||
| 57 | + } | ||
| 58 | + | ||
| 59 | + /** | ||
| 43 | * 保存配置 | 60 | * 保存配置 |
| 44 | * @param ServerConfigRequest $request | 61 | * @param ServerConfigRequest $request |
| 45 | * @param ServerConfigLogic $logic | 62 | * @param ServerConfigLogic $logic |
| @@ -45,6 +45,28 @@ class ServerConfigLogic extends BaseLogic | @@ -45,6 +45,28 @@ class ServerConfigLogic extends BaseLogic | ||
| 45 | return $this->success($lists); | 45 | return $this->success($lists); |
| 46 | } | 46 | } |
| 47 | 47 | ||
| 48 | + /** | ||
| 49 | + * @remark :获取当前数据详情 | ||
| 50 | + * @name :getServiceConfig | ||
| 51 | + * @author :lyh | ||
| 52 | + * @method :post | ||
| 53 | + * @time :2023/8/2 17:53 | ||
| 54 | + */ | ||
| 55 | + public function getServiceConfig(){ | ||
| 56 | + $info = $this->model->read(['id'=>$this->param['id']]); | ||
| 57 | + if($info === false){ | ||
| 58 | + $this->fail('当前数据不存在或者被删除'); | ||
| 59 | + } | ||
| 60 | + return $this->success($info); | ||
| 61 | + } | ||
| 62 | + | ||
| 63 | + /** | ||
| 64 | + * @remark :保存 | ||
| 65 | + * @name :save | ||
| 66 | + * @author :lyh | ||
| 67 | + * @method :post | ||
| 68 | + * @time :2023/8/2 17:55 | ||
| 69 | + */ | ||
| 48 | public function save($param) | 70 | public function save($param) |
| 49 | { | 71 | { |
| 50 | $project_logic = new ProjectLogic(); | 72 | $project_logic = new ProjectLogic(); |
| @@ -138,9 +138,6 @@ class MenuLogic extends BaseLogic | @@ -138,9 +138,6 @@ class MenuLogic extends BaseLogic | ||
| 138 | * @time :2023/7/25 14:22 | 138 | * @time :2023/7/25 14:22 |
| 139 | */ | 139 | */ |
| 140 | public function roleMenuSave(){ | 140 | public function roleMenuSave(){ |
| 141 | - if($this->param['pid'] == 0){ | ||
| 142 | - $this->fail('主菜单不允许添加权限菜单'); | ||
| 143 | - } | ||
| 144 | //设置为权限菜单 | 141 | //设置为权限菜单 |
| 145 | $this->param['type'] = $this->model::STATUS_NORMAL; | 142 | $this->param['type'] = $this->model::STATUS_NORMAL; |
| 146 | if(isset($this->param['id']) && !empty($this->param['id'])){ | 143 | if(isset($this->param['id']) && !empty($this->param['id'])){ |
-
请 注册 或 登录 后发表评论