From 3f3c003b13776fc85c1125a0c480019006063af5 Mon Sep 17 00:00:00 2001 From: liaofei <136327134@qq.com> Date: Fri, 26 Aug 2022 09:18:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B6=88=E6=81=AF=E6=8F=90?= =?UTF-8?q?=E9=86=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/services/system/admin/SystemAdminServices.php | 10 +++++++--- crmeb/config/app.php | 2 ++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/crmeb/app/services/system/admin/SystemAdminServices.php b/crmeb/app/services/system/admin/SystemAdminServices.php index 62c0b501f..bf5f73e0e 100644 --- a/crmeb/app/services/system/admin/SystemAdminServices.php +++ b/crmeb/app/services/system/admin/SystemAdminServices.php @@ -21,6 +21,7 @@ use app\dao\system\admin\SystemAdminDao; use app\services\system\SystemMenusServices; use crmeb\services\FormBuilder; use crmeb\services\workerman\ChannelService; +use think\facade\Config; use think\facade\Event; /** @@ -95,7 +96,10 @@ class SystemAdminServices extends BaseServices /** @var SystemMenusServices $services */ $services = app()->make(SystemMenusServices::class); [$menus, $uniqueAuth] = $services->getMenusList($adminInfo->roles, (int)$adminInfo['level']); - [$queue, $timer] = Event::until('admin.login', [$key]); + $remind = Config::get('app.console_remind', false); + if ($remind) { + [$queue, $timer] = Event::until('admin.login', [$key]); + } return [ 'token' => $tokenInfo['token'], 'expires_time' => $tokenInfo['params']['exp'], @@ -110,8 +114,8 @@ class SystemAdminServices extends BaseServices 'logo_square' => sys_config('site_logo_square'), 'version' => get_crmeb_version(), 'newOrderAudioLink' => get_file_link(sys_config('new_order_audio_link', '')), - 'queue' => $queue, - 'timer' => $timer + 'queue' => $queue ?? false, + 'timer' => $timer ?? false ]; } diff --git a/crmeb/config/app.php b/crmeb/config/app.php index cfbe385ee..5860a30d8 100644 --- a/crmeb/config/app.php +++ b/crmeb/config/app.php @@ -44,4 +44,6 @@ return [ 'error_message' => '页面错误!请稍后再试~', // 显示错误信息 'show_error_msg' => false, + // 命令开启提醒 + 'console_remind' => true ];