From b19d6d768c59d1abb29bffe6c339046ca105b338 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 25 Dec 2019 15:31:40 +0800 Subject: [PATCH] update --- app/Http/Controllers/Passport/LoginController.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/Passport/LoginController.php b/app/Http/Controllers/Passport/LoginController.php index acb90fd0..5484ae0c 100755 --- a/app/Http/Controllers/Passport/LoginController.php +++ b/app/Http/Controllers/Passport/LoginController.php @@ -38,6 +38,7 @@ class LoginController extends Controller if (empty($request->input('token'))) { abort(500, '参数错误'); } + $redirect = $request->input('redirect') ? $request->input('redirect') : 'dashboard'; $user = User::where('token', $request->input('token'))->first(); if ($user) { $request->session()->put('email', $user->email); @@ -47,9 +48,9 @@ class LoginController extends Controller } } if (config('v2board.app_url')) { - $location = config('v2board.app_url') . '/#/' . $request->input('redirect') ? $request->input('redirect') : 'dashboard'; + $location = config('v2board.app_url') . '/#/' . $redirect; } else { - $location = url('/#/' . $request->input('redirect') ? $request->input('redirect') : 'dashboard'); + $location = url('/#/' . $redirect); } header('Location:' . $location); }