app.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | ThinkPHP [ WE CAN DO IT JUST THINK ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
  8. // +----------------------------------------------------------------------
  9. // | Author: liu21st <liu21st@gmail.com>
  10. // +----------------------------------------------------------------------
  11. use think\facade\Route;
  12. //手机端
  13. Route::rule('mobile/:any', function () {
  14. return view(app()->getRootPath() . 'public/mobile/index.html');
  15. })->pattern(['any' => '\w+']);
  16. //管理后台
  17. Route::rule('admin/:any', function () {
  18. return view(app()->getRootPath() . 'public/admin/index.html');
  19. })->pattern(['any' => '\w+']);
  20. //PC端
  21. Route::rule('pc/:any', function () {
  22. return view(app()->getRootPath() . 'public/admin/index.html');
  23. })->pattern(['any' => '\w+']);
  24. // 客服
  25. Route::rule('kefu/:any', function () {
  26. return view(app()->getRootPath() . 'public/kefu/index.html');
  27. })->pattern(['any' => '\w+']);
  28. //定时任务
  29. Route::rule('crontab', function () {
  30. \think\facade\Console::call('crontab');
  31. });
  32. //商家管理端
  33. Route::rule('business/:any', function () {
  34. return view(app()->getRootPath() . 'public/business/index.html');
  35. })->pattern(['any' => '\w+']);