// +---------------------------------------------------------------------- use think\facade\Config; use think\facade\Route; // PC商城端 $isOpen = \app\common\server\ConfigServer::get('pc', 'is_open', 1); if(!$isOpen) { return ''; } Config::set(['app_trace' => false]); return view(app()->getRootPath() . 'public/index.html'); //定时任务 Route::rule('crontab', function () { \think\facade\Console::call('crontab'); });