liumiao
2021-02-03 37c4eeb331e902430943b901bd05d0c627cd6123
修改登陆提示
1 files modified
5 ■■■■■ changed files
app/Http/Middleware/api/CheckLoginMiddleware.php 5 ●●●●● patch | view | raw | blame | history
app/Http/Middleware/api/CheckLoginMiddleware.php
@@ -22,6 +22,7 @@
    {
        $redis = new CustomRedis();
        $teacherId = $request->teacherId;
        $url = explode('/', $request->getRequestUri());
        if(is_numeric($teacherId) && $teacherId > 0)
        {
            //处理登录信息
@@ -58,6 +59,10 @@
                return apiResponse([], ResponseCode::PLEASE_LOGIN, '请登录');
            }
        }
        else if(is_numeric($teacherId) && $teacherId == 0 && $url[count($url) - 1] != "login")
        {
            return apiResponse([], ResponseCode::PLEASE_LOGIN, '请登录');
        }
        else
        {
            return $next($request);