From 832242122e5985f75d41b20c26fb1689e131a3e4 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Thu, 12 Aug 2021 14:06:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Common/extend.php | 4 +++- Application/Admin/Event/MarketEvent.class.php | 7 ++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Application/Admin/Common/extend.php b/Application/Admin/Common/extend.php index bce83d53a..7f21dbe2a 100644 --- a/Application/Admin/Common/extend.php +++ b/Application/Admin/Common/extend.php @@ -1684,7 +1684,9 @@ function getPowerPromoteIds() if (in_array('-1',explode(',',$userAuth['data_president']))) { $promoteIds = $promoteIds .',0'; } -// var_dump($promoteIds);die(); + if(!$promoteIds){ + $promoteIds = "-1"; + } session('user_auth_promote_ids', $promoteIds); return $promoteIds; } diff --git a/Application/Admin/Event/MarketEvent.class.php b/Application/Admin/Event/MarketEvent.class.php index fbe79a52b..b8239a2be 100644 --- a/Application/Admin/Event/MarketEvent.class.php +++ b/Application/Admin/Event/MarketEvent.class.php @@ -228,9 +228,14 @@ class MarketEvent extends Controller ->where(['id' =>['in',$userAuth['data_president']],'level'=>1]) ->group('company_id') ->getField('company_id',true); - $companyIds = implode(",",$dbres); + if($dbres){ + $companyIds = implode(",",$dbres); + }else{ + $companyIds = "-1"; + } } } + // dd($companyIds); session('user_auth_company_ids', $companyIds); return $companyIds; }