Index.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | ThinkAdmin
  4. // +----------------------------------------------------------------------
  5. // | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
  6. // +----------------------------------------------------------------------
  7. // | 官方网站: http://demo.thinkadmin.top
  8. // +----------------------------------------------------------------------
  9. // | 开源协议 ( https://mit-license.org )
  10. // +----------------------------------------------------------------------
  11. // | gitee 代码仓库:https://gitee.com/zoujingli/ThinkAdmin
  12. // | github 代码仓库:https://github.com/zoujingli/ThinkAdmin
  13. // +----------------------------------------------------------------------
  14. namespace app\index\controller;
  15. use library\Controller;
  16. /**
  17. * 应用入口
  18. * Class Index
  19. * @package app\index\controller
  20. */
  21. class Index extends Controller
  22. {
  23. /**
  24. * 入口跳转链接
  25. */
  26. public function index()
  27. {
  28. // $this->redirect('@admin/login');
  29. if(strpos(input('server.HTTP_REFERER'), 'admin') === false){
  30. $this->redirect('/pc');
  31. } else{
  32. $this->redirect('@admin/login');
  33. }
  34. }
  35. }