From fe5b7a987a62c3b7cbebab7d524ab00ace02d41d Mon Sep 17 00:00:00 2001 From: hdm Date: Wed, 8 Mar 2023 23:05:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=88=E5=90=8C=E7=AE=A1=E7=90=86=E5=91=98?= =?UTF-8?q?=E6=9D=83=E9=99=90=E8=AF=BB=E5=8F=96=E9=94=99=E8=AF=AF=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/contract/controller/Api.php | 2 +- app/contract/controller/Index.php | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/contract/controller/Api.php b/app/contract/controller/Api.php index b930a99..85acd80 100644 --- a/app/contract/controller/Api.php +++ b/app/contract/controller/Api.php @@ -26,7 +26,7 @@ class Api extends BaseController $where[] = ['delete_time', '=', 0]; $where[] = ['check_status', '=', 2]; $uid = $this->uid; - $auth = isAuth($uid,'contract'); + $auth = isAuth($uid,'contract_admin'); if($auth==0){ $whereOr[] =['admin_id|prepared_uid|sign_uid|keeper_uid', '=', $uid]; $whereOr[] = ['', 'exp', Db::raw("FIND_IN_SET('{$uid}',share_ids)")]; diff --git a/app/contract/controller/Index.php b/app/contract/controller/Index.php index df593d2..b831762 100644 --- a/app/contract/controller/Index.php +++ b/app/contract/controller/Index.php @@ -40,7 +40,7 @@ class Index extends BaseController $where[] = ['a.archive_status', '=', 0]; $uid = $this->uid; - $auth = isAuth($uid,'contract'); + $auth = isAuth($uid,'contract_admin'); if($auth==0){ $whereOr[] =['a.admin_id|a.prepared_uid|a.sign_uid|a.keeper_uid', '=', $uid]; $whereOr[] = ['', 'exp', Db::raw("FIND_IN_SET('{$uid}',a.share_ids)")]; @@ -56,6 +56,9 @@ class Index extends BaseController $list = $model->get_list($param, $where, $whereOr); return table_assign(0, '', $list); } else { + $uid = $this->uid; + $auth = isAuth($uid,'contract_admin'); + View::assign('auth', $auth); return view(); } }