fastadmin框架中的重定向

由于,我们一打开fastadmin框架就进入到前端页面很麻烦,下面这种方法可以解决这个问题。
首先我们找到这个路径

 找到重定向,

原本文件是这个样子:

<?php

namespace app\index\controller;

use app\common\controller\Frontend;

class Index extends Frontend
{

    protected $noNeedLogin = '*';
    protected $noNeedRight = '*';
    protected $layout = '';

    public function index()
    {
        return $this->view->fetch();
    }

}

改为:

<?php

namespace app\index\controller;

use app\common\controller\Frontend;

class Index extends Frontend
{

    protected $noNeedLogin = '*';
    protected $noNeedRight = '*';
    protected $layout = '';

    public function index()
    {
        $this->redirect("/ZeGLzMFAkS.php");   //关键代码重定向
    }

}

切记:redirect中的路径是自己的这是我的

猜你喜欢

转载自blog.csdn.net/m0_64590669/article/details/131294555