改进 欢迎页面
This commit is contained in:
parent
5787b0c420
commit
e3dc5a6a51
@ -28,12 +28,12 @@ public function index(Request $request): View|RedirectResponse
|
||||
|
||||
session(['callback' => $callback]);
|
||||
|
||||
if (Auth::guard('web')->check()) {
|
||||
if ($request->user('web')) {
|
||||
$callbackHost = parse_url($callback, PHP_URL_HOST);
|
||||
$dashboardHost = parse_url(config('settings.dashboard.base_url'), PHP_URL_HOST);
|
||||
|
||||
if ($callbackHost === $dashboardHost) {
|
||||
if (! Auth::guard('web')->user()->isRealNamed()) {
|
||||
if (! $request->user('web')->isRealNamed()) {
|
||||
return redirect()->route('real_name.create')->with('status', '重定向已被打断,需要先实人认证。');
|
||||
}
|
||||
|
||||
@ -51,7 +51,7 @@ public function index(Request $request): View|RedirectResponse
|
||||
}
|
||||
}
|
||||
|
||||
return view('index');
|
||||
return $request->user('web') ? view('index') : view('welcome');
|
||||
}
|
||||
|
||||
public function confirm_redirect(Request $request): View
|
||||
|
@ -2,17 +2,6 @@
|
||||
|
||||
@section('content')
|
||||
|
||||
@guest
|
||||
<h3>欢迎使用 {{ config('app.display_name') }}</h3>
|
||||
<p>您需要先 登录 / 注册,才能继续使用 {{ config('app.display_name') }}。</p>
|
||||
|
||||
<p>如果您继续,则代表您已经阅读并同意 <a href="https://www.laecloud.com/tos/" target="_blank"
|
||||
class="text-decoration-underline">服务条款</a></p>
|
||||
<a href="{{ route('login') }}" class="btn btn-primary">登录</a>
|
||||
<a href="{{ route('register') }}" class="btn btn-primary">注册</a>
|
||||
@endguest
|
||||
|
||||
@auth
|
||||
@if(!auth('web')->user()->isRealNamed())
|
||||
<x-alert-danger>
|
||||
<div>
|
||||
@ -104,6 +93,4 @@ class="text-decoration-underline">服务条款</a></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endauth
|
||||
|
||||
@endsection
|
||||
|
11
resources/views/welcome.blade.php
Normal file
11
resources/views/welcome.blade.php
Normal file
@ -0,0 +1,11 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<h3>欢迎使用 {{ config('app.display_name') }}</h3>
|
||||
<p>您需要先 登录 / 注册,才能继续使用 {{ config('app.display_name') }}。</p>
|
||||
|
||||
<p>如果您继续,则代表您已经阅读并同意 <a href="https://www.laecloud.com/tos/" target="_blank"
|
||||
class="text-decoration-underline">服务条款</a></p>
|
||||
<a href="{{ route('login') }}" class="btn btn-primary">登录</a>
|
||||
<a href="{{ route('register') }}" class="btn btn-primary">注册</a>
|
||||
@endsection
|
Loading…
Reference in New Issue
Block a user