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'); + }); +}