Skip to content

Commit

Permalink
fix(*): Remove redirect await page.
Browse files Browse the repository at this point in the history
zhiyicx/thinksns-plus-android#2276
  • Loading branch information
medz committed Sep 6, 2018
1 parent b0af976 commit f8d67ca
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 103 deletions.
12 changes: 9 additions & 3 deletions app/Http/Controllers/HomeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ public function welcome(Agent $agent)
return view('welcome');
}

/**
* Redirect URL.
* @param \Illuminate\Http\Request $request
* @param \Jenssegers\Agent\Agent $agent
* @return mixed
*/
public function redirect(Request $request, Agent $agent)
{
$target = $request->input('target', '');
Expand All @@ -55,7 +61,7 @@ public function redirect(Request $request, Agent $agent)
if ($isUrl !== false) {
$redirect = $isUrl;

return view('redirect', ['redirect' => $redirect]);
return redirect($redirect);
}

$agent->isMobile();
Expand All @@ -65,12 +71,12 @@ public function redirect(Request $request, Agent $agent)
if ($agent->isMobile() && $spa['open']) {
$redirect = trim($spa['url'], '/').$target;

return view('redirect', ['redirect' => $redirect]);
return redirect($redirect);
}
if ($web['open']) {
$redirect = trim(config('app.url'), '/').$target;

return view('redirect', ['redirect' => $redirect]);
return redirect($redirect);
}

return view('welcome');
Expand Down
100 changes: 0 additions & 100 deletions resources/views/redirect.blade.php

This file was deleted.

0 comments on commit f8d67ca

Please sign in to comment.