1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <?php
-
-
-
-
-
-
-
-
-
- use think\facade\Config;
- use think\facade\Route;
-
-
-
- Route::rule('mobile/:any', function () {
- $isOpen = \app\common\server\ConfigServer::get('h5', 'is_open', 1);
- if(!$isOpen) {
- return '';
- }
- Config::set(['app_trace' => false]);
- return view(app()->getRootPath() . 'public/mobile/index.html');
- })->pattern(['any' => '\w+']);
-
-
-
- Route::rule('pc/:any', function () {
- $isOpen = \app\common\server\ConfigServer::get('pc', 'is_open', 1);
- if(!$isOpen) {
- return '';
- }
- Config::set(['app_trace' => false]);
- return view(app()->getRootPath() . 'public/pc/index.html');
- })->pattern(['any' => '\w+']);
-
-
-
- Route::rule('business/:any', function () {
- Config::set(['app_trace' => false]);
- return view(app()->getRootPath() . 'public/business/index.html');
- })->pattern(['any' => '\w+']);
-
-
-
- Route::rule('kefu/:any', function () {
- Config::set(['app_trace' => false]);
- return view(app()->getRootPath() . 'public/kefu/index.html');
- })->pattern(['any' => '\w+']);
-
-
- Route::rule('crontab', function () {
- \think\facade\Console::call('crontab');
- });
|