合并分支 'lyh-server' 到 'master'
gx白帽seo前后缀 查看合并请求 !2194
正在显示
1 个修改的文件
包含
9 行增加
和
7 行删除
| @@ -90,15 +90,17 @@ class ProjectWhiteHatAffixController extends BaseController | @@ -90,15 +90,17 @@ class ProjectWhiteHatAffixController extends BaseController | ||
| 90 | */ | 90 | */ |
| 91 | public function del(){ | 91 | public function del(){ |
| 92 | $this->request->validate([ | 92 | $this->request->validate([ |
| 93 | - 'id'=>'required', | 93 | + 'ids'=>'required', |
| 94 | ],[ | 94 | ],[ |
| 95 | - 'id.required' => '项目id不能为空', | 95 | + 'ids.required' => '项目id不能为空', |
| 96 | ]); | 96 | ]); |
| 97 | - $info = $this->model->read(['id'=>$this->param['id']]); | ||
| 98 | - if($info['project_id'] == 0){ | ||
| 99 | - $this->response('当前前后缀为公共前后缀,不允许删除',Code::USER_ERROR); | 97 | + foreach ($this->param['ids'] as $id){ |
| 98 | + $info = $this->model->read(['id'=>$id]); | ||
| 99 | + if($info['project_id'] == 0){ | ||
| 100 | + continue; | ||
| 101 | + } | ||
| 102 | + $this->model->del(['id'=>$id]); | ||
| 100 | } | 103 | } |
| 101 | - $data = $this->model->del(['id'=>$this->param['id']]); | ||
| 102 | - $this->response('success',Code::SUCCESS,$data); | 104 | + $this->response('success'); |
| 103 | } | 105 | } |
| 104 | } | 106 | } |
-
请 注册 或 登录 后发表评论