From 2c89f9a760adad19ac6a5c4657b731bef9e1f576 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=99=AF=E7=AB=8B?= Date: Mon, 22 Feb 2021 18:24:04 +0800 Subject: [PATCH] Update sys.php --- app/wechat/sys.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/wechat/sys.php b/app/wechat/sys.php index acf05480e..e4ac882fe 100644 --- a/app/wechat/sys.php +++ b/app/wechat/sys.php @@ -15,6 +15,8 @@ use think\Console; -Console::starting(function (Console $console) { - $console->addCommand('app\wechat\command\Fans'); -}); \ No newline at end of file +if (app()->request->isCli()) { + Console::starting(function (Console $console) { + $console->addCommand('app\wechat\command\Fans'); + }); +}