From 9f03758b0e6405cead1e63542f4f080a53ae4c9a Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Tue, 15 Aug 2023 16:40:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/controller/TaskController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/api/controller/TaskController.php b/app/api/controller/TaskController.php index 02755b3b6..a734142fe 100644 --- a/app/api/controller/TaskController.php +++ b/app/api/controller/TaskController.php @@ -9,8 +9,10 @@ class TaskController extends BaseApiController{ public function lists(){ $param = Request()->param(); [$page, $limit] = $this->getPage(); - if($this->userInfo['admin_id']!=00){ + if($this->userInfo['admin_id']!=0){ $where[]=['company_id','=',$this->userInfo['company_id']]; + }else{ + $where[]=['director_uid','=',$this->userId]; } $res=Task::where($where) ->field(['id', 'title','money','template_id','director_uid', 'company_id', 'start_time', 'end_time', 'director_uid', 'type', 'status', 'content','extend'])