正在显示
4 个修改的文件
包含
10 行增加
和
11 行删除
| @@ -80,9 +80,10 @@ class MailController extends BaseController | @@ -80,9 +80,10 @@ class MailController extends BaseController | ||
| 80 | */ | 80 | */ |
| 81 | public function del(MailLogic $mailLogic){ | 81 | public function del(MailLogic $mailLogic){ |
| 82 | $this->request->validate([ | 82 | $this->request->validate([ |
| 83 | - 'id'=>'required' | 83 | + 'id'=>['required','array'], |
| 84 | ],[ | 84 | ],[ |
| 85 | - 'id.required' => 'ID不能为空' | 85 | + 'id.required' => 'ID不能为空', |
| 86 | + 'id.array' => 'ID为数组', | ||
| 86 | ]); | 87 | ]); |
| 87 | $mailLogic->mail_del(); | 88 | $mailLogic->mail_del(); |
| 88 | $this->response('success'); | 89 | $this->response('success'); |
| @@ -21,6 +21,9 @@ class ProjectDeptController extends BaseController | @@ -21,6 +21,9 @@ class ProjectDeptController extends BaseController | ||
| 21 | * @time :2023/6/17 16:13 | 21 | * @time :2023/6/17 16:13 |
| 22 | */ | 22 | */ |
| 23 | public function lists(DeptLogic $deptLogic){ | 23 | public function lists(DeptLogic $deptLogic){ |
| 24 | + if(isset($this->map['title']) && !empty($this->map['title'])){ | ||
| 25 | + $this->map['title'] = ['like','%'.$this->map['title'].'%']; | ||
| 26 | + } | ||
| 24 | $lists = $deptLogic->DeptLists($this->map,$this->page,$this->row,$this->order); | 27 | $lists = $deptLogic->DeptLists($this->map,$this->page,$this->row,$this->order); |
| 25 | $this->response('success',Code::SUCCESS,$lists); | 28 | $this->response('success',Code::SUCCESS,$lists); |
| 26 | } | 29 | } |
| @@ -164,9 +164,6 @@ class BaseController extends Controller | @@ -164,9 +164,6 @@ class BaseController extends Controller | ||
| 164 | $data['images_link'][$k1] = url('/b/image/' . $v1); | 164 | $data['images_link'][$k1] = url('/b/image/' . $v1); |
| 165 | } | 165 | } |
| 166 | break; | 166 | break; |
| 167 | - case 'country_img'://国家图标 | ||
| 168 | - $data['image_link'] = url('upload/country/' . $v); | ||
| 169 | - break; | ||
| 170 | case 'file': | 167 | case 'file': |
| 171 | $data['file_link'] = url('/b/file_hash/' . $v); | 168 | $data['file_link'] = url('/b/file_hash/' . $v); |
| 172 | break; | 169 | break; |
| @@ -25,14 +25,12 @@ class WebSettingCountryLogic extends BaseLogic | @@ -25,14 +25,12 @@ class WebSettingCountryLogic extends BaseLogic | ||
| 25 | */ | 25 | */ |
| 26 | public function country_list(){ | 26 | public function country_list(){ |
| 27 | $lists = $this->model->list($this->param,'id',['id','name','country_img']); | 27 | $lists = $this->model->list($this->param,'id',['id','name','country_img']); |
| 28 | - if (empty($lists)){ | ||
| 29 | - $this->fail('当前数据不存在'); | 28 | + if (!empty($lists)){ |
| 29 | + foreach ($lists as $k => $v){ | ||
| 30 | + $lists[$k]['image_link'] = url('upload/country/' . $v); | ||
| 31 | + } | ||
| 30 | } | 32 | } |
| 31 | return $this->success($lists); | 33 | return $this->success($lists); |
| 32 | } | 34 | } |
| 33 | 35 | ||
| 34 | - public function edit_country(){ | ||
| 35 | - | ||
| 36 | - return $this->success(); | ||
| 37 | - } | ||
| 38 | } | 36 | } |
-
请 注册 或 登录 后发表评论