AddFeature: 添加缺失处理办法

添加 404.blade.php
添加 no-permission.blade.php
路由表配置对应数据及格式整理

Signed-off-by: XiaoLFeng <gm@x-lf.cn>
This commit is contained in:
筱锋xiao_lfeng 2023-07-09 15:35:54 +08:00
parent fd9cb5f520
commit 8a52e35c94
3 changed files with 186 additions and 22 deletions

View File

@ -0,0 +1,78 @@
<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="{{ asset('css/app.css') }}">
<link rel="stylesheet" href="{{ asset('css/flowbite.css') }}">
@include('modules.head')
{!! $webHeader !!}
</head>
<body style="overflow: hidden;height: 100vh">
<div class="bg-white">
<div class="relative isolate px-6 lg:px-8">
<div class="absolute inset-x-0 -top-40 -z-10 transform-gpu overflow-hidden blur-3xl sm:-top-80"
aria-hidden="true">
<div
class="relative left-[calc(50%-11rem)] aspect-[1155/678] w-[36.125rem] -translate-x-1/2 rotate-[30deg] bg-gradient-to-tr from-[#ff80b5] to-[#9089fc] opacity-30 sm:left-[calc(50%-30rem)] sm:w-[72.1875rem]"
style="clip-path: polygon(74.1% 44.1%, 100% 61.6%, 97.5% 26.9%, 85.5% 0.1%, 80.7% 2%, 72.5% 32.5%, 60.2% 62.4%, 52.4% 68.1%, 47.5% 58.3%, 45.2% 34.5%, 27.5% 76.7%, 0.1% 64.9%, 17.9% 100%, 27.6% 76.8%, 76.1% 97.7%, 74.1% 44.1%)"></div>
</div>
<div class="mx-auto max-w-2xl py-32 sm:py-38 lg:py-40 xl:py-48">
<div class="text-center">
<h1 class="text-6xl font-bold tracking-tight text-gray-900 sm:text-6xl">Not Founded</h1>
<p class="mt-6 text-lg leading-8 text-gray-600">没有找到页面 (404 Page Not Founded)</p>
<p class="my-6">
<a href="javascript:history.back()" type="button" class="text-white bg-gradient-to-r from-cyan-400 via-cyan-500 to-cyan-600
hover:bg-gradient-to-br focus:ring-4 focus:outline-none focus:ring-cyan-300 dark:focus:ring-cyan-800 font-medium rounded-lg text-sm
px-5 py-2.5 text-center mr-2 mb-2">
<i class="bi bi-arrow-bar-left"></i>
<span class="ps-1">返回之前页面</span>
</a>
</p>
</div>
</div>
<div
class="absolute inset-x-0 top-[calc(100%-13rem)] -z-10 transform-gpu overflow-hidden blur-3xl sm:top-[calc(100%-30rem)]"
aria-hidden="true">
<div
class="relative left-[calc(50%+3rem)] aspect-[1155/678] w-[36.125rem] -translate-x-1/2 bg-gradient-to-tr from-[#ff80b5] to-[#9089fc] opacity-30 sm:left-[calc(50%+36rem)] sm:w-[72.1875rem]"
style="clip-path: polygon(74.1% 44.1%, 100% 61.6%, 97.5% 26.9%, 85.5% 0.1%, 80.7% 2%, 72.5% 32.5%, 60.2% 62.4%, 52.4% 68.1%, 47.5% 58.3%, 45.2% 34.5%, 27.5% 76.7%, 0.1% 64.9%, 17.9% 100%, 27.6% 76.8%, 76.1% 97.7%, 74.1% 44.1%)"></div>
</div>
</div>
</div>
<footer class="fixed bottom-0 left-0 z-20 w-full p-4 md:flex md:items-end md:justify-between md:p-6">
@if(empty($sqlIcp) && empty($sqlGongan))
<div class="flex text-sm text-gray-500 dark:text-gray-400"></div>
<div class="flex text-sm text-gray-500 dark:text-gray-400">
<span class="flex justify-start"><i class="bi bi-c-circle"></i> @if(empty(!$sqlCopyRightYear))
{{ $sqlCopyRightYear }}-{{ date('Y') }}
@else
{{ date('Y') }}
@endif {{ $sqlAuthor }}. All Rights Reserved.</span>
</div>
@else
<div class="flex text-sm text-gray-500 dark:text-gray-400">
<span class="flex justify-start"><i class="bi bi-c-circle pe-2"></i> @if(empty(!$sqlCopyRightYear))
{{ $sqlCopyRightYear }}-{{ date('Y') }}
@else
{{ date('Y') }}
@endif {{ $sqlAuthor }}. All Rights Reserved.</span>
</div>
<div class="grid grid-cols-1 text-sm text-gray-500 dark:text-gray-400">
@if(!empty($sqlIcp))
<a href="https://beian.miit.gov.cn/"><span class="flex justify-end @if(!empty($sqlGongan))mb-1 @endif"><i class="bi bi-balloon pe-2"></i> {{ $sqlIcp }}</span></a>
@endif
@if(!empty($sqlGongan))
<a href="https://www.beian.gov.cn/portal/registerSystemInfo?recordcode={{ $GonganCode }}"><span
class="flex justify-end @if(!empty($sqlIcp))mt-1 @endif"><i class="bi bi-balloon-heart pe-2"></i> {{ $sqlGongan }}</span></a>
@endif
</div>
@endif
</footer>
</body>
<script src="{{ asset('js/app.js') }}"></script>
<script src="{{ asset('js/jquery.js') }}"></script>
{!! $webFooter !!}
</html>

View File

@ -0,0 +1,84 @@
<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="{{ asset('css/app.css') }}">
<link rel="stylesheet" href="{{ asset('css/flowbite.css') }}">
@include('modules.head')
{!! $webHeader !!}
</head>
<body style="overflow: hidden;height: 100vh">
<div class="bg-white">
<div class="relative isolate px-6 lg:px-8">
<div class="absolute inset-x-0 -top-40 -z-10 transform-gpu overflow-hidden blur-3xl sm:-top-80"
aria-hidden="true">
<div
class="relative left-[calc(50%-11rem)] aspect-[1155/678] w-[36.125rem] -translate-x-1/2 rotate-[30deg] bg-gradient-to-tr from-[#ff80b5] to-[#9089fc] opacity-30 sm:left-[calc(50%-30rem)] sm:w-[72.1875rem]"
style="clip-path: polygon(74.1% 44.1%, 100% 61.6%, 97.5% 26.9%, 85.5% 0.1%, 80.7% 2%, 72.5% 32.5%, 60.2% 62.4%, 52.4% 68.1%, 47.5% 58.3%, 45.2% 34.5%, 27.5% 76.7%, 0.1% 64.9%, 17.9% 100%, 27.6% 76.8%, 76.1% 97.7%, 74.1% 44.1%)"></div>
</div>
<div class="mx-auto max-w-2xl py-32 sm:py-38 lg:py-40 xl:py-48">
<div class="text-center">
<h1 class="text-6xl font-bold tracking-tight text-gray-900 sm:text-6xl">No Permission</h1>
<p class="mt-6 text-lg leading-8 text-gray-600">您没有权限</p>
<p class="my-6">
<a href="{{ route('home') }}" type="button" class="text-white bg-gradient-to-r from-green-400 via-green-500 to-green-600
hover:bg-gradient-to-br focus:ring-4 focus:outline-none focus:ring-green-300 dark:focus:ring-green-800 font-medium rounded-lg text-sm
px-5 py-2.5 text-center mr-2 mb-2">
<i class="bi bi-house"></i>
<span class="ps-1">返回主界面</span>
</a>
<a href="{{ route('logout') }}" type="button" class="text-white bg-gradient-to-r from-blue-500 via-blue-600 to-blue-700
hover:bg-gradient-to-br focus:ring-4 focus:outline-none focus:ring-blue-300 dark:focus:ring-blue-800 font-medium rounded-lg text-sm px-5
py-2.5 text-center mr-2 mb-2">
<i class="bi bi-people"></i>
<span class="ps-1">切换用户</span>
</a>
</p>
</div>
</div>
<div
class="absolute inset-x-0 top-[calc(100%-13rem)] -z-10 transform-gpu overflow-hidden blur-3xl sm:top-[calc(100%-30rem)]"
aria-hidden="true">
<div
class="relative left-[calc(50%+3rem)] aspect-[1155/678] w-[36.125rem] -translate-x-1/2 bg-gradient-to-tr from-[#ff80b5] to-[#9089fc] opacity-30 sm:left-[calc(50%+36rem)] sm:w-[72.1875rem]"
style="clip-path: polygon(74.1% 44.1%, 100% 61.6%, 97.5% 26.9%, 85.5% 0.1%, 80.7% 2%, 72.5% 32.5%, 60.2% 62.4%, 52.4% 68.1%, 47.5% 58.3%, 45.2% 34.5%, 27.5% 76.7%, 0.1% 64.9%, 17.9% 100%, 27.6% 76.8%, 76.1% 97.7%, 74.1% 44.1%)"></div>
</div>
</div>
</div>
<footer class="fixed bottom-0 left-0 z-20 w-full p-4 md:flex md:items-end md:justify-between md:p-6">
@if(empty($sqlIcp) && empty($sqlGongan))
<div class="flex text-sm text-gray-500 dark:text-gray-400"></div>
<div class="flex text-sm text-gray-500 dark:text-gray-400">
<span class="flex justify-start"><i class="bi bi-c-circle"></i> @if(empty(!$sqlCopyRightYear))
{{ $sqlCopyRightYear }}-{{ date('Y') }}
@else
{{ date('Y') }}
@endif {{ $sqlAuthor }}. All Rights Reserved.</span>
</div>
@else
<div class="flex text-sm text-gray-500 dark:text-gray-400">
<span class="flex justify-start"><i class="bi bi-c-circle pe-2"></i> @if(empty(!$sqlCopyRightYear))
{{ $sqlCopyRightYear }}-{{ date('Y') }}
@else
{{ date('Y') }}
@endif {{ $sqlAuthor }}. All Rights Reserved.</span>
</div>
<div class="grid grid-cols-1 text-sm text-gray-500 dark:text-gray-400">
@if(!empty($sqlIcp))
<a href="https://beian.miit.gov.cn/"><span class="flex justify-end @if(!empty($sqlGongan))mb-1 @endif"><i class="bi bi-balloon pe-2"></i> {{ $sqlIcp }}</span></a>
@endif
@if(!empty($sqlGongan))
<a href="https://www.beian.gov.cn/portal/registerSystemInfo?recordcode={{ $GonganCode }}"><span
class="flex justify-end @if(!empty($sqlIcp))mt-1 @endif"><i class="bi bi-balloon-heart pe-2"></i> {{ $sqlGongan }}</span></a>
@endif
</div>
@endif
</footer>
</body>
<script src="{{ asset('js/app.js') }}"></script>
<script src="{{ asset('js/jquery.js') }}"></script>
{!! $webFooter !!}
</html>

View File

@ -25,20 +25,22 @@
|
*/
Route::get('/', [Index::class,'ViewIndex'])->name('home');
Route::get('/', [Index::class, 'ViewIndex'])->name('home');
Route::get('about', [Index::class, 'ViewAboutMe'])->name('about');
Route::get('404', [Index::class, 'viewPageNotFounded'])->name('404');
Route::get('no-permission', [Index::class, 'viewNoPermission'])->name('no-permission');
Route::get('backup', [\App\Http\Controllers\DataBase::class, '__construct']);
Route::prefix('function')->group(function () {
Route::get('link',[UserLink::class, 'viewLink'])->name('function.link');
Route::get('link', [UserLink::class, 'viewLink'])->name('function.link');
Route::get('make-friend', [UserLink::class, 'viewMakeFriend'])->name('function.make-friend');
Route::get('edit-search', [UserLink::class, 'viewSearchFriends'])->name('function.edit-search');
Route::get('edit-search/{friendId}', [UserLink::class, 'viewSearchFriend'])->name('function.edit-searchOnly');
Route::get('edit-friend/{friendId}',[UserLink::class,'viewEditFriend'])->name('function.edit-friend');
Route::get('sponsor',function () {
Route::get('edit-friend/{friendId}', [UserLink::class, 'viewEditFriend'])->name('function.edit-friend');
Route::get('sponsor', function () {
return view('function.sponsor');
})->name('function.sponsor');
Route::get('music',function () {
Route::get('music', function () {
return view('function.music');
})->name('function.music');
});
@ -50,38 +52,38 @@
});
});
Route::prefix('console')->middleware('auth')->group(function () {
Route::get('dashboard', [Dashboard::class,'ViewDashboard'])->name('console.dashboard');
Route::prefix('console')->middleware('authConsole')->group(function () {
Route::get('dashboard', [Dashboard::class, 'ViewDashboard'])->name('console.dashboard');
Route::prefix('friends-link')->group(function () {
Route::redirect('list','list/1');
Route::get('list',[ConsoleLink::class,'ViewList'])->name('console.friends-link.list');
Route::get('check',[ConsoleLink::class,'ViewCheck'])->name('console.friends-link.check');
Route::get('edit/{userId}',function ($userId) {
Route::redirect('list', 'list/1');
Route::get('list', [ConsoleLink::class, 'ViewList'])->name('console.friends-link.list');
Route::get('check', [ConsoleLink::class, 'ViewCheck'])->name('console.friends-link.check');
Route::get('edit/{userId}', function ($userId) {
$ConsoleLink = new ConsoleLink();
$request = new Request();
return $ConsoleLink->ViewEdit($request,$userId);
return $ConsoleLink->ViewEdit($request, $userId);
})->name('console.friends-link.edit');
Route::get('add',[ConsoleLink::class,'ViewAdd'])->name('console.friends-link.add');
Route::get('sort',[ConsoleLink::class,'ViewSort'])->name('console.friends-link.sort');
Route::get('color',[ConsoleLink::class,'ViewColor'])->name('console.friends-link.color');
Route::get('add', [ConsoleLink::class, 'ViewAdd'])->name('console.friends-link.add');
Route::get('sort', [ConsoleLink::class, 'ViewSort'])->name('console.friends-link.sort');
Route::get('color', [ConsoleLink::class, 'ViewColor'])->name('console.friends-link.color');
});
});
Route::prefix('auth')->group(function () {
Route::redirect('','auth/login');
Route::redirect('', 'auth/login');
Route::get('login', function () {
$data = (new Index())->data;
return view('auth.login',$data);
return view('auth.login', $data);
})->name('login');
Route::get('register',function () {
Route::get('register', function () {
$data = (new Index())->data;
return view('auth.register',$data);
return view('auth.register', $data);
})->name('register');
Route::get('forgotpassword',function () {
Route::get('forgotpassword', function () {
$data = (new Index())->data;
return view('auth.forgotpassword',$data);
return view('auth.forgotpassword', $data);
})->name('forgotpassword');
Route::match(['get','post'],'logout',function () {
Route::match(['get', 'post'], 'logout', function () {
Auth::logout();
return Response::redirectTo('');
})->name('logout');