feature #7
|
@ -91,6 +91,11 @@ protected function ViewList(Request $request): Factory|View|Application|Redirect
|
||||||
|
|
||||||
protected function ViewCheck(Request $request): Factory|View|Application
|
protected function ViewCheck(Request $request): Factory|View|Application
|
||||||
{
|
{
|
||||||
|
// 检查是否存在含有未在本站分配位置
|
||||||
|
$this->data['blog'] = DB::table('blog_link')
|
||||||
|
->whereIn('blog_link.blogLocation',[0])
|
||||||
|
->get()
|
||||||
|
->toArray();
|
||||||
return view('console.friends-link.check', $this->data);
|
return view('console.friends-link.check', $this->data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -106,6 +111,11 @@ protected function ViewSort(): Factory|View|Application
|
||||||
|
|
||||||
protected function ViewColor(): Factory|View|Application
|
protected function ViewColor(): Factory|View|Application
|
||||||
{
|
{
|
||||||
return view('concole.friends-link.color',$this->data);
|
return view('console.friends-link.color',$this->data);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function apiConsoleAdd() {
|
||||||
|
// 检查数据
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,8 +12,13 @@
|
||||||
use Illuminate\Contracts\Foundation\Application;
|
use Illuminate\Contracts\Foundation\Application;
|
||||||
use Illuminate\Contracts\View\Factory;
|
use Illuminate\Contracts\View\Factory;
|
||||||
use Illuminate\Contracts\View\View;
|
use Illuminate\Contracts\View\View;
|
||||||
|
use Illuminate\Http\JsonResponse;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
|
use Illuminate\Mail\Message;
|
||||||
use Illuminate\Support\Facades\DB;
|
use Illuminate\Support\Facades\DB;
|
||||||
|
use Illuminate\Support\Facades\Mail;
|
||||||
|
use Illuminate\Support\Facades\Response;
|
||||||
|
use Illuminate\Support\Facades\Validator;
|
||||||
|
|
||||||
class Link extends Controller
|
class Link extends Controller
|
||||||
{
|
{
|
||||||
|
@ -25,22 +30,252 @@ public function __construct()
|
||||||
$this->data = $data->data;
|
$this->data = $data->data;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function ViewLink(Request $request): Factory|View|Application
|
public function apiCustomAdd(Request $request): JsonResponse
|
||||||
|
{
|
||||||
|
/** @var array $returnData Json的 return 返回值 */
|
||||||
|
/** @var Validator $dataCheck 数据判断 */
|
||||||
|
/** @var array $errorInfo 错误信息 */
|
||||||
|
/** @var array $errorSingle 输出单个错误信息 */
|
||||||
|
// 检查数据
|
||||||
|
$dataCheck = Validator::make($request->all(), [
|
||||||
|
'userEmail' => 'required|email',
|
||||||
|
'userServerHost' => 'required|string',
|
||||||
|
'userBlog' => 'required|string',
|
||||||
|
'userUrl' => 'required|regex:#[a-zA-z]+://[^\s]*#',
|
||||||
|
'userDescription' => 'required|string',
|
||||||
|
'userIcon' => 'required|regex:#[a-zA-z]+://[^\s]*#',
|
||||||
|
'checkRssJudge' => 'boolean',
|
||||||
|
'userRss' => 'string|regex:#[a-zA-z]+://[^\s]*#',
|
||||||
|
'userLocation' => 'required|int',
|
||||||
|
'userSelColor' => 'required|int',
|
||||||
|
'userRemark' => 'required|string',
|
||||||
|
]);
|
||||||
|
|
||||||
|
// 检查发现错误
|
||||||
|
if ($dataCheck->fails()) {
|
||||||
|
$errorType = array_keys($dataCheck->failed());
|
||||||
|
$i = 0;
|
||||||
|
foreach ($dataCheck->failed() as $valueData) {
|
||||||
|
$errorInfo[$errorType[$i]] = array_keys($valueData);
|
||||||
|
if ($i == 0) {
|
||||||
|
$errorSingle = [
|
||||||
|
'info' => $errorType[$i],
|
||||||
|
'need' => $errorInfo[$errorType[$i]],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
$returnData = [
|
||||||
|
'output' => 'DataFormatError',
|
||||||
|
'code' => 403,
|
||||||
|
'data' => [
|
||||||
|
'message' => '输入内容有错误',
|
||||||
|
'errorSingle' => $errorSingle,
|
||||||
|
'error' => $errorInfo,
|
||||||
|
],
|
||||||
|
];
|
||||||
|
} else {
|
||||||
|
// 检查数据
|
||||||
|
if (empty($request->checkRssJudge)) {
|
||||||
|
$request->checkRssJudge = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 根据数据库检查邮箱用户是否已存在
|
||||||
|
$resultBlog = DB::table('blog_link')
|
||||||
|
->where([
|
||||||
|
['blogOwnEmail', '=', $request->userEmail, 'or'],
|
||||||
|
['blogName', '=', $request->userBlog, 'or'],
|
||||||
|
['blogUrl', '=', $request->userUrl, 'or']
|
||||||
|
])->get()->toArray();
|
||||||
|
|
||||||
|
if (empty($resultBlog)) {
|
||||||
|
// 数据写入数据库
|
||||||
|
$insertData = DB::table('blog_link')
|
||||||
|
->insert([
|
||||||
|
'blogOwnEmail' => $request->userEmail,
|
||||||
|
'blogUrl' => $request->userUrl,
|
||||||
|
'blogName' => $request->userBlog,
|
||||||
|
'blogDescription' => $request->userDescription,
|
||||||
|
'blogIcon' => $request->userIcon,
|
||||||
|
'blogRssJudge' => $request->checkRssJudge,
|
||||||
|
'blogRSS' => $request->userRss,
|
||||||
|
'blogUserLocation' => $request->userLocation,
|
||||||
|
'blogSetColor' => $request->userSelColor,
|
||||||
|
'blogRemark' => $request->userRemark,
|
||||||
|
]);
|
||||||
|
if ($insertData) {
|
||||||
|
// 邮件发送系统
|
||||||
|
Mail::send('mail.link-custom-add', $request->toArray(), function (Message $mail) {
|
||||||
|
global $request;
|
||||||
|
$mail->from(env('MAIL_USERNAME'), env('APP_NAME'));
|
||||||
|
$mail->to($request->userEmail);
|
||||||
|
$mail->subject(env('APP_NAME') . '-友链等待审核通知');
|
||||||
|
});
|
||||||
|
// 消息成功通知
|
||||||
|
$returnData = [
|
||||||
|
'output' => 'Success',
|
||||||
|
'code' => 200,
|
||||||
|
'data' => [
|
||||||
|
'message' => '您已成功申请',
|
||||||
|
],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$returnData = [
|
||||||
|
'output' => 'AlreadyUser',
|
||||||
|
'code' => 403,
|
||||||
|
'data' => [
|
||||||
|
'message' => '已有此用户,您是否已在本博客注册过',
|
||||||
|
],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return Response::json($returnData, $returnData['code']);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function apiCustomSearch(Request $request): JsonResponse
|
||||||
|
{
|
||||||
|
/** @var array $returnData Json的 return 返回值 */
|
||||||
|
if (!empty($request->location_search)) {
|
||||||
|
if ($request->searchType == 'all') {
|
||||||
|
$resultData = DB::table('blog_link')
|
||||||
|
->where([
|
||||||
|
['blogName', 'LIKE', '%' . $request->location_search . '%', 'or'],
|
||||||
|
['blogUrl', 'LIKE', '%' . $request->location_search . '%', 'or'],
|
||||||
|
['blogOwnEmail', 'LIKE', '%' . $request->location_search . '%', 'or']])
|
||||||
|
->select('blogName','blogUrl','blogDescription','blogIcon')
|
||||||
|
->orderBy('id')
|
||||||
|
->get()
|
||||||
|
->toArray();
|
||||||
|
if (!empty($resultData)) {
|
||||||
|
$returnData = [
|
||||||
|
'output' => 'Success',
|
||||||
|
'code' => 200,
|
||||||
|
'data' => [
|
||||||
|
'message' => '数据输出成功',
|
||||||
|
'data' => $resultData,
|
||||||
|
],
|
||||||
|
];
|
||||||
|
} else {
|
||||||
|
$returnData = [
|
||||||
|
'output' => 'NoData',
|
||||||
|
'code' => 200,
|
||||||
|
'data' => [
|
||||||
|
'message' => '没有数据',
|
||||||
|
],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if ($request->searchType == 'blogName') {
|
||||||
|
$resultData = DB::table('blog_link')
|
||||||
|
->where([['blogName', 'LIKE', '%' . $request->location_search . '%']])
|
||||||
|
->select('blogName','blogUrl','blogDescription','blogIcon')
|
||||||
|
->orderBy('id')
|
||||||
|
->get()
|
||||||
|
->toArray();
|
||||||
|
if (!empty($resultData)) {
|
||||||
|
$returnData = [
|
||||||
|
'output' => 'Success',
|
||||||
|
'code' => 200,
|
||||||
|
'data' => [
|
||||||
|
'message' => '数据输出成功',
|
||||||
|
'data' => $resultData,
|
||||||
|
],
|
||||||
|
];
|
||||||
|
} else {
|
||||||
|
$returnData = [
|
||||||
|
'output' => 'NoData',
|
||||||
|
'code' => 200,
|
||||||
|
'data' => [
|
||||||
|
'message' => '没有数据',
|
||||||
|
],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
} elseif ($request->searchType == 'blogUrl') {
|
||||||
|
$resultData = DB::table('blog_link')
|
||||||
|
->where([['blogUrl', 'LIKE', '%' . $request->location_search . '%']])
|
||||||
|
->select('blogName','blogUrl','blogDescription','blogIcon')
|
||||||
|
->orderBy('id')
|
||||||
|
->get()
|
||||||
|
->toArray();
|
||||||
|
if (!empty($resultData)) {
|
||||||
|
$returnData = [
|
||||||
|
'output' => 'Success',
|
||||||
|
'code' => 200,
|
||||||
|
'data' => [
|
||||||
|
'message' => '数据输出成功',
|
||||||
|
'data' => $resultData,
|
||||||
|
],
|
||||||
|
];
|
||||||
|
} else {
|
||||||
|
$returnData = [
|
||||||
|
'output' => 'NoData',
|
||||||
|
'code' => 200,
|
||||||
|
'data' => [
|
||||||
|
'message' => '没有数据',
|
||||||
|
],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$returnData = [
|
||||||
|
'output' => 'TypeError',
|
||||||
|
'code' => 403,
|
||||||
|
'data' => [
|
||||||
|
'message' => '类型错误请检查',
|
||||||
|
],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$returnData = [
|
||||||
|
'output' => 'SearchEmpty',
|
||||||
|
'code' => 403,
|
||||||
|
'data' => [
|
||||||
|
'message' => '搜索为空,请输入内容',
|
||||||
|
],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
return Response::json($returnData,$returnData['code']);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function viewLink(Request $request): Factory|View|Application
|
||||||
{
|
{
|
||||||
$this->data['webSubTitle'] = '友链';
|
$this->data['webSubTitle'] = '友链';
|
||||||
$this->GetFriendsLink($this->data);
|
$this->GetFriendsLink($this->data);
|
||||||
return view('function.link', $this->data);
|
return view('function.link', $this->data);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function ViewMakeFriend(): Factory|View|Application
|
|
||||||
{
|
|
||||||
$this->data['webSubTitle'] = '添加友链';
|
|
||||||
return view('function.make-friend',$this->data);
|
|
||||||
}
|
|
||||||
|
|
||||||
private function GetFriendsLink(array &$data): void
|
private function GetFriendsLink(array &$data): void
|
||||||
{
|
{
|
||||||
$data['blogLink'] = DB::table('blog_link')->whereNotIn('blog_link.blogLocation', [0])->get()->toArray();
|
$data['blogLink'] = DB::table('blog_link')->whereNotIn('blog_link.blogLocation', [0])->get()->toArray();
|
||||||
$data['blogSort'] = DB::table('blog_sort')->orderBy('blog_sort.sort')->get()->toArray();
|
$data['blogSort'] = DB::table('blog_sort')->orderBy('blog_sort.sort')->get()->toArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function viewMakeFriend(): Factory|View|Application
|
||||||
|
{
|
||||||
|
$this->data['webSubTitle'] = '添加友链';
|
||||||
|
$this->data['blogColor'] = DB::table('blog_color')
|
||||||
|
->orderBy('id')
|
||||||
|
->get()
|
||||||
|
->toArray();
|
||||||
|
$this->data['blogSort'] = DB::table('blog_sort')
|
||||||
|
->orderBy('sort')
|
||||||
|
->get()
|
||||||
|
->toArray();
|
||||||
|
return view('function.make-friend', $this->data);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function viewEditFriend(): Factory|View|Application
|
||||||
|
{
|
||||||
|
$this->data['webSubTitle'] = '修改友链';
|
||||||
|
|
||||||
|
return view('function.edit-friend', $this->data);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function viewSearchFriends(): Factory|View|Application
|
||||||
|
{
|
||||||
|
$this->data['webSubTitle'] = '查询列表';
|
||||||
|
return view('function.edit-search', $this->data);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,7 +45,7 @@ public function boot()
|
||||||
$this->routes(function () {
|
$this->routes(function () {
|
||||||
Route::prefix('api')
|
Route::prefix('api')
|
||||||
->middleware('api')
|
->middleware('api')
|
||||||
->namespace($this->namespace)
|
->namespace($this->namespace.'\\api')
|
||||||
->group(base_path('routes/api.php'));
|
->group(base_path('routes/api.php'));
|
||||||
|
|
||||||
Route::middleware('web')
|
Route::middleware('web')
|
||||||
|
|
|
@ -20,6 +20,18 @@ public function up()
|
||||||
{
|
{
|
||||||
Schema::table('blog_link', function (Blueprint $table) {
|
Schema::table('blog_link', function (Blueprint $table) {
|
||||||
$table->boolean('blogAddType')->default(0)->after('blogLocation');
|
$table->boolean('blogAddType')->default(0)->after('blogLocation');
|
||||||
|
$table->unsignedInteger('blogUserLocation')
|
||||||
|
->default(0)
|
||||||
|
->after('blogSetColor')
|
||||||
|
->comment('用户期望位置');
|
||||||
|
$table->unsignedBigInteger('blogForUser')
|
||||||
|
->nullable()
|
||||||
|
->after('blogUserLocation')
|
||||||
|
->comment('绑定已注册用户');
|
||||||
|
$table->string('blogRemark')
|
||||||
|
->nullable()
|
||||||
|
->after('blogForUser')
|
||||||
|
->comment('博客备注信息');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,7 @@ class="block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ri
|
||||||
<div>
|
<div>
|
||||||
<button type="submit"
|
<button type="submit"
|
||||||
class="flex w-full justify-center rounded-md bg-indigo-600 px-3 py-1.5 text-sm font-semibold leading-6 text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600"
|
class="flex w-full justify-center rounded-md bg-indigo-600 px-3 py-1.5 text-sm font-semibold leading-6 text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600"
|
||||||
onclick="user_change()">
|
onclick="buttonLogin()">
|
||||||
登录
|
登录
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -63,7 +63,7 @@ class="font-semibold leading-6 text-indigo-600 hover:text-indigo-500">点击注
|
||||||
<script src="{{ asset('js/app.js') }}"></script>
|
<script src="{{ asset('js/app.js') }}"></script>
|
||||||
<script src="{{ asset('js/jquery.js') }}"></script>
|
<script src="{{ asset('js/jquery.js') }}"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
function user_change() {
|
function buttonLogin() {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
async: true,
|
async: true,
|
||||||
method: "POST",
|
method: "POST",
|
||||||
|
|
101
resources/views/console/friends-link/check.blade.php
Normal file
101
resources/views/console/friends-link/check.blade.php
Normal file
|
@ -0,0 +1,101 @@
|
||||||
|
<!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>
|
||||||
|
|
||||||
|
<button data-drawer-target="sidebar-multi-level-sidebar" data-drawer-toggle="sidebar-multi-level-sidebar"
|
||||||
|
aria-controls="sidebar-multi-level-sidebar" type="button"
|
||||||
|
class="inline-flex items-center p-2 mt-2 ml-3 text-sm text-gray-500 rounded-lg sm:hidden hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-gray-200 dark:text-gray-400 dark:hover:bg-gray-700 dark:focus:ring-gray-600">
|
||||||
|
<span class="sr-only">Open sidebar</span>
|
||||||
|
<svg class="w-6 h-6" aria-hidden="true" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path clip-rule="evenodd" fill-rule="evenodd"
|
||||||
|
d="M2 4.75A.75.75 0 012.75 4h14.5a.75.75 0 010 1.5H2.75A.75.75 0 012 4.75zm0 10.5a.75.75 0 01.75-.75h7.5a.75.75 0 010 1.5h-7.5a.75.75 0 01-.75-.75zM2 10a.75.75 0 01.75-.75h14.5a.75.75 0 010 1.5H2.75A.75.75 0 012 10z"></path>
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
@include('console.modules.aside')
|
||||||
|
|
||||||
|
<div class="p-4 sm:ml-64">
|
||||||
|
<div class="p-4 border-gray-200 border-dashed rounded-lg dark:border-gray-700">
|
||||||
|
@include('console.modules.personal')
|
||||||
|
<div class="grid grid-cols-1 gap-4 mb-4">
|
||||||
|
<div class="text-2xl text-gray-400 dark:text-gray-500"><i class="bi bi-link-45deg"></i> 友链修改</div>
|
||||||
|
</div>
|
||||||
|
<div class="grid grid-cols-10 gap-4 mb-4">
|
||||||
|
<div class="col-span-10 lg:col-span-7 items-center justify-center rounded bg-gray-50 dark:bg-gray-800 shadow">
|
||||||
|
<div class="px-10 py-5">
|
||||||
|
@if(!empty($blog))
|
||||||
|
<ul class="divide-y divide-gray-200 dark:divide-gray-700">
|
||||||
|
@foreach($blog as $blogValue)
|
||||||
|
<li class="py-3 sm:py-4">
|
||||||
|
<div class="flex items-center space-x-4">
|
||||||
|
<div class="flex-shrink-0">
|
||||||
|
<img id="Lazy" class="w-10 h-10 rounded-full" src="{{ asset('images/avatar.png') }}" data-src="{{ $blogValue->blogIcon }}" alt="Neil image">
|
||||||
|
</div>
|
||||||
|
<div class="flex-1 min-w-0">
|
||||||
|
<p class="text-sm font-bold text-gray-900 truncate dark:text-white">
|
||||||
|
{{ $blogValue->blogName }}
|
||||||
|
</p>
|
||||||
|
<p class="text-sm text-gray-400 truncate dark:text-gray-300">
|
||||||
|
<a href="{{ $blogValue->blogUrl }}" target="_blank">{{ $blogValue->blogUrl }}</a>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<a href="?" type="button" class="inline-flex items-center text-base font-semibold text-gray-900 dark:text-white">
|
||||||
|
<a href="{{ route('console.friends-link.edit',$blogValue->id) }}" type="button" class="text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm w-full sm:w-auto px-3 py-2 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800">
|
||||||
|
<i class="bi bi-pencil"></i>
|
||||||
|
<span class="ps-1">编辑</span>
|
||||||
|
</a>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
@endforeach
|
||||||
|
</ul>
|
||||||
|
@else
|
||||||
|
<h1 class="text-center mb-4 text-4xl font-extrabold leading-none tracking-tight text-gray-900 md:text-5xl lg:text-6xl dark:text-white mt-5">暂无待审核用户</h1>
|
||||||
|
<p class="mb-6 text-lg font-normal text-gray-500 lg:text-xl sm:px-16 xl:px-48 dark:text-gray-400 text-center">去去其他地方逛逛吧</p>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="sm:hidden lg:block col-span-3 gird grid-cols-1">
|
||||||
|
<div class="items-center justify-center rounded bg-gray-50 dark:bg-gray-800 shadow grid grid-cols-1 mb-4">
|
||||||
|
<a href="{{ route('console.dashboard') }}" type="submit" class="text-white bg-blue-500 hover:bg-blue-600 focus:ring-blue-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm w-full sm:w-auto px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800">
|
||||||
|
<i class="bi bi-person"></i>
|
||||||
|
<span class="ps-1">返回管理主页</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="items-center justify-center rounded bg-gray-50 dark:bg-gray-800 shadow grid grid-cols-1">
|
||||||
|
<a href="{{ route('console.friends-link.list') }}" type="submit" class="text-white bg-green-500 hover:bg-green-600 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm w-full sm:w-auto px-5 py-2.5 text-center dark:bg-green-600 dark:hover:bg-green-700 dark:focus:ring-blue-800">
|
||||||
|
<i class="bi bi-house"></i>
|
||||||
|
<span class="ps-1">返回友链列表</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
<script src="{{ asset('js/app.js') }}"></script>
|
||||||
|
<script src="{{ asset('js/jquery.js') }}"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
document.addEventListener('DOMContentLoaded', function () {
|
||||||
|
const lazyLoadInstance = new LazyLoad({
|
||||||
|
elements_selector: '#Lazy', // 指定要延迟加载的元素选择器
|
||||||
|
loaded: function (element) {
|
||||||
|
element.classList.add('fade');
|
||||||
|
},
|
||||||
|
callback_error: function (element) {
|
||||||
|
element.src = '{{ asset('images/avatar.png') }}'; // 图像加载失败时替换为占位图像
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</html>
|
|
@ -34,7 +34,7 @@ class="flex items-center w-full p-2 text-gray-900 transition duration-75 rounded
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="#{{ route('console.friends-link.check') }}"
|
<a href="{{ route('console.friends-link.check') }}"
|
||||||
class="flex items-center w-full p-2 text-gray-900 transition duration-75 rounded-lg pl-11 group hover:bg-gray-100 dark:text-white dark:hover:bg-gray-700">
|
class="flex items-center w-full p-2 text-gray-900 transition duration-75 rounded-lg pl-11 group hover:bg-gray-100 dark:text-white dark:hover:bg-gray-700">
|
||||||
<i class="bi bi-cloud-check"></i>
|
<i class="bi bi-cloud-check"></i>
|
||||||
<span class="ml-3">待审核</span>
|
<span class="ml-3">待审核</span>
|
||||||
|
|
|
@ -49,7 +49,7 @@ class="w-16 h-16 p-1 rounded-full ring-2 ring-gray-300 dark:ring-gray-500 me-2 s
|
||||||
|
|
||||||
<div data-dial-init class="fixed right-6 bottom-6 group">
|
<div data-dial-init class="fixed right-6 bottom-6 group">
|
||||||
<div id="speed-dial-menu-square" class="flex flex-col items-center hidden mb-4 space-y-2">
|
<div id="speed-dial-menu-square" class="flex flex-col items-center hidden mb-4 space-y-2">
|
||||||
<a href="{{ route('function.make-friend') }}" type="button" data-tooltip-target="tooltip-print" data-tooltip-placement="left" class="flex justify-center items-center w-[52px] h-[52px] text-gray-500 hover:text-gray-900 bg-red-100 rounded-lg border border-gray-200 dark:border-gray-600 shadow-sm dark:hover:text-white dark:text-gray-400 hover:bg-red-200 dark:bg-gray-700 dark:hover:bg-gray-600 focus:ring-4 focus:ring-gray-300 focus:outline-none dark:focus:ring-gray-400">
|
<a href="{{ route('account.friend.link') }}" type="button" data-tooltip-target="tooltip-print" data-tooltip-placement="left" class="flex justify-center items-center w-[52px] h-[52px] text-gray-500 hover:text-gray-900 bg-red-100 rounded-lg border border-gray-200 dark:border-gray-600 shadow-sm dark:hover:text-white dark:text-gray-400 hover:bg-red-200 dark:bg-gray-700 dark:hover:bg-gray-600 focus:ring-4 focus:ring-gray-300 focus:outline-none dark:focus:ring-gray-400">
|
||||||
<i class="bi bi-trash3"></i>
|
<i class="bi bi-trash3"></i>
|
||||||
<span class="sr-only">删除友链</span>
|
<span class="sr-only">删除友链</span>
|
||||||
</a>
|
</a>
|
||||||
|
@ -57,7 +57,7 @@ class="w-16 h-16 p-1 rounded-full ring-2 ring-gray-300 dark:ring-gray-500 me-2 s
|
||||||
删除
|
删除
|
||||||
<div class="tooltip-arrow" data-popper-arrow></div>
|
<div class="tooltip-arrow" data-popper-arrow></div>
|
||||||
</div>
|
</div>
|
||||||
<a href="{{ route('function.make-friend') }}" type="button" data-tooltip-target="tooltip-download" data-tooltip-placement="left" class="flex justify-center items-center w-[52px] h-[52px] text-gray-500 hover:text-gray-900 bg-white rounded-lg border border-gray-200 dark:border-gray-600 shadow-sm dark:hover:text-white dark:text-gray-400 hover:bg-gray-100 dark:bg-gray-700 dark:hover:bg-gray-600 focus:ring-4 focus:ring-gray-300 focus:outline-none dark:focus:ring-gray-400">
|
<a href="{{ route('function.edit-search') }}" type="button" data-tooltip-target="tooltip-download" data-tooltip-placement="left" class="flex justify-center items-center w-[52px] h-[52px] text-gray-500 hover:text-gray-900 bg-white rounded-lg border border-gray-200 dark:border-gray-600 shadow-sm dark:hover:text-white dark:text-gray-400 hover:bg-gray-100 dark:bg-gray-700 dark:hover:bg-gray-600 focus:ring-4 focus:ring-gray-300 focus:outline-none dark:focus:ring-gray-400">
|
||||||
<i class="bi bi-pencil"></i>
|
<i class="bi bi-pencil"></i>
|
||||||
<span class="sr-only">修改友链</span>
|
<span class="sr-only">修改友链</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -23,7 +23,7 @@ class="relative left-[calc(50%-11rem)] aspect-[1155/678] w-[36.125rem] -translat
|
||||||
<div class="mx-auto my-10 max-w-4xl py-8 sm:py-16 lg:py-16">
|
<div class="mx-auto my-10 max-w-4xl py-8 sm:py-16 lg:py-16">
|
||||||
<a href="{{ route('function.link') }}" type="button" class="text-white mb-5 bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm w-full sm:w-auto px-3 py-2 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"><i class="bi bi-box-arrow-left me-1"></i> 返回友链</a>
|
<a href="{{ route('function.link') }}" type="button" class="text-white mb-5 bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm w-full sm:w-auto px-3 py-2 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"><i class="bi bi-box-arrow-left me-1"></i> 返回友链</a>
|
||||||
<div class="w-full p-4 bg-white border border-gray-200 rounded-lg shadow-lg sm:p-8 dark:bg-gray-800 dark:border-gray-700">
|
<div class="w-full p-4 bg-white border border-gray-200 rounded-lg shadow-lg sm:p-8 dark:bg-gray-800 dark:border-gray-700">
|
||||||
<form>
|
<form id="FormData" action="#" onsubmit="return false" method="POST">
|
||||||
<div class="grid gap-6 mb-6 md:grid-cols-2">
|
<div class="grid gap-6 mb-6 md:grid-cols-2">
|
||||||
<div>
|
<div>
|
||||||
<label for="userEmail" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">博主邮箱 <span class="text-red-700">*</span></label>
|
<label for="userEmail" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">博主邮箱 <span class="text-red-700">*</span></label>
|
||||||
|
@ -102,7 +102,7 @@ class="relative left-[calc(50%-11rem)] aspect-[1155/678] w-[36.125rem] -translat
|
||||||
<div class="mb-6 grid grid-cols-1 md:grid-cols-3 items-end">
|
<div class="mb-6 grid grid-cols-1 md:grid-cols-3 items-end">
|
||||||
<div class="col-span-1 mb-3 md:mb-0">
|
<div class="col-span-1 mb-3 md:mb-0">
|
||||||
<label class="relative inline-flex">
|
<label class="relative inline-flex">
|
||||||
<input type="checkbox" id="checkRssJudge" value="1" class="sr-only peer">
|
<input type="checkbox" id="checkRssJudge" name="checkRssJudge" value="1" class="sr-only peer">
|
||||||
<div class="w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 rounded-full peer dark:bg-gray-700 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600"></div>
|
<div class="w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 rounded-full peer dark:bg-gray-700 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600"></div>
|
||||||
<span class="ml-3 text-sm font-medium text-gray-900 dark:text-gray-300">我的博客拥有 RSS 地址</span>
|
<span class="ml-3 text-sm font-medium text-gray-900 dark:text-gray-300">我的博客拥有 RSS 地址</span>
|
||||||
</label>
|
</label>
|
||||||
|
@ -126,12 +126,15 @@ class="relative left-[calc(50%-11rem)] aspect-[1155/678] w-[36.125rem] -translat
|
||||||
<div class="grid gap-6 mb-6 md:grid-cols-2">
|
<div class="grid gap-6 mb-6 md:grid-cols-2">
|
||||||
<div>
|
<div>
|
||||||
<label for="userLocation" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">期望板块 <span class="text-red-700">*</span></label>
|
<label for="userLocation" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">期望板块 <span class="text-red-700">*</span></label>
|
||||||
<select id="userLocation" class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500">
|
<select id="userLocation" name="userLocation" class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500">
|
||||||
<option selected>请选择一个板块</option>
|
<option>请选择一个板块</option>
|
||||||
<option value="US">United States</option>
|
@if(empty($blogSort[0]))
|
||||||
<option value="CA">Canada</option>
|
<option>站长没有设置可用板块呢</option>
|
||||||
<option value="FR">France</option>
|
@else
|
||||||
<option value="DE">Germany</option>
|
@foreach($blogSort as $blogValue)
|
||||||
|
<option value="{{ $blogValue->id }}">{!! $blogValue->title !!}</option>
|
||||||
|
@endforeach
|
||||||
|
@endif
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
|
@ -149,23 +152,35 @@ class="w-16 h-16 p-1 rounded-full ring-2 ring-gray-300 dark:ring-gray-500 me-2 s
|
||||||
</div>
|
</div>
|
||||||
<div class="tooltip-arrow" data-popper-arrow></div>
|
<div class="tooltip-arrow" data-popper-arrow></div>
|
||||||
</div>
|
</div>
|
||||||
<select id="userSelColor" class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500">
|
<select id="userSelColor" name="userSelColor" class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500">
|
||||||
<option selected>请选择一个颜色</option>
|
<option>请选择一个颜色</option>
|
||||||
<option value="US">United States</option>
|
@if(empty($blogColor[0]))
|
||||||
<option value="CA">Canada</option>
|
<option>站长没有设置可用颜色呢</option>
|
||||||
<option value="FR">France</option>
|
@else
|
||||||
<option value="DE">Germany</option>
|
@foreach($blogColor as $blogValue)
|
||||||
|
<option value="{{ $blogValue->id }}">{!! $blogValue->comment !!}</option>
|
||||||
|
@endforeach
|
||||||
|
@endif
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="mb-6">
|
||||||
|
<label for="userRemark" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">留言备注</label>
|
||||||
|
<div class="relative">
|
||||||
|
<div class="absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none">
|
||||||
|
<i class="bi bi-chat-left-text"></i>
|
||||||
|
</div>
|
||||||
|
<input type="text" name="userRemark" id="userRemark" placeholder="多多关照哦~" class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full pl-10 p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<hr class="h-px my-8 bg-gray-200 border-0 dark:bg-gray-700">
|
<hr class="h-px my-8 bg-gray-200 border-0 dark:bg-gray-700">
|
||||||
<div class="flex items-start mb-6">
|
<div class="flex items-start mb-6">
|
||||||
<div class="flex items-center h-5">
|
<div class="flex items-center h-5">
|
||||||
<input id="remember" type="checkbox" value="" class="w-4 h-4 border border-gray-300 rounded bg-gray-50 focus:ring-3 focus:ring-blue-300 dark:bg-gray-700 dark:border-gray-600 dark:focus:ring-blue-600 dark:ring-offset-gray-800" required>
|
<input id="remember" type="checkbox" value="1" class="w-4 h-4 border border-gray-300 rounded bg-gray-50 focus:ring-3 focus:ring-blue-300 dark:bg-gray-700 dark:border-gray-600 dark:focus:ring-blue-600 dark:ring-offset-gray-800" required>
|
||||||
</div>
|
</div>
|
||||||
<label for="remember" class="ml-2 text-sm font-medium text-gray-900 dark:text-gray-300">我满足 <a href="#" class="text-blue-600 hover:underline dark:text-blue-500">《凌中的锋雨-友链申请要求》</a></label>
|
<label for="remember" class="ml-2 text-sm font-medium text-gray-900 dark:text-gray-300">我满足 <a href="#" class="text-blue-600 hover:underline dark:text-blue-500">《凌中的锋雨-友链申请要求》</a></label>
|
||||||
</div>
|
</div>
|
||||||
<button type="submit" class="text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm w-full sm:w-auto px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"><i class="bi bi-send me-1"></i>发送申请</button>
|
<button onclick="buttonSubmit()" class="text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm w-full sm:w-auto px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"><i class="bi bi-send me-1"></i>发送申请</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -180,6 +195,38 @@ class="relative left-[calc(50%+3rem)] aspect-[1155/678] w-[36.125rem] -translate
|
||||||
@include('modules.footer')
|
@include('modules.footer')
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- Toast -->
|
||||||
|
<div id="toast" class="z-[9999] fixed top-5 left-5 hidden items-center w-full max-w-xs p-4 space-x-4 text-gray-500 bg-white divide-x divide-gray-200 rounded-lg shadow dark:text-gray-400 dark:divide-gray-700 space-x dark:bg-gray-800" role="alert">
|
||||||
|
<div class="pl-4 text-sm font-normal">
|
||||||
|
<span id="toast-icon" class="pe-1"><i class="bi bi-info-circle text-blue-500"></i></span>
|
||||||
|
<span id="toast-info">Message sent successfully.</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="toast-interactive" class="z-[9999] fixed top-5 left-5 hidden w-full max-w-xs p-4 text-gray-500 bg-white rounded-lg shadow dark:bg-gray-800 dark:text-gray-400" role="alert">
|
||||||
|
<div class="flex">
|
||||||
|
<div class="inline-flex items-center justify-center flex-shrink-0 w-8 h-8 text-blue-500 bg-blue-100 rounded-lg dark:text-blue-300 dark:bg-blue-900">
|
||||||
|
<svg aria-hidden="true" class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M4 2a1 1 0 011 1v2.101a7.002 7.002 0 0111.601 2.566 1 1 0 11-1.885.666A5.002 5.002 0 005.999 7H9a1 1 0 010 2H4a1 1 0 01-1-1V3a1 1 0 011-1zm.008 9.057a1 1 0 011.276.61A5.002 5.002 0 0014.001 13H11a1 1 0 110-2h5a1 1 0 011 1v5a1 1 0 11-2 0v-2.101a7.002 7.002 0 01-11.601-2.566 1 1 0 01.61-1.276z" clip-rule="evenodd"></path></svg>
|
||||||
|
<span class="sr-only">Refresh icon</span>
|
||||||
|
</div>
|
||||||
|
<div class="ml-3 text-sm font-normal">
|
||||||
|
<span class="mb-1 text-sm font-semibold text-gray-900 dark:text-white">友链已登记</span>
|
||||||
|
<div class="mb-2 text-sm font-normal">已经存有该博客(博客名字、博客地址、博主邮箱不得重复),请确认您没有输入错误吗?<span class="text-red-500">(如果想修改已登记博客,请使用在友链登记邮箱进行注册/登录进行修改)</span></div>
|
||||||
|
<div class="grid grid-cols-2 gap-2">
|
||||||
|
<div>
|
||||||
|
<a href="{{ route('login') }}" class="inline-flex justify-center w-full px-2 py-1.5 text-xs font-medium text-center text-white bg-blue-600 rounded-lg hover:bg-blue-700 focus:ring-4 focus:outline-none focus:ring-blue-300 dark:bg-blue-500 dark:hover:bg-blue-600 dark:focus:ring-blue-800">登录</a>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<a id="edit-friend" href="{{ route('function.edit-friend') }}" class="inline-flex justify-center w-full px-2 py-1.5 text-xs font-medium text-center text-gray-900 bg-white border border-gray-300 rounded-lg hover:bg-gray-100 focus:ring-4 focus:outline-none focus:ring-gray-200 dark:bg-gray-600 dark:text-white dark:border-gray-600 dark:hover:bg-gray-700 dark:hover:border-gray-700 dark:focus:ring-gray-700">检索</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<button type="button" class="ml-auto -mx-1.5 -my-1.5 bg-white text-gray-400 hover:text-gray-900 rounded-lg focus:ring-2 focus:ring-gray-300 p-1.5 hover:bg-gray-100 inline-flex h-8 w-8 dark:text-gray-500 dark:hover:text-white dark:bg-gray-800 dark:hover:bg-gray-700" data-dismiss-target="#toast-interactive" aria-label="Close">
|
||||||
|
<span class="sr-only">Close</span>
|
||||||
|
<svg aria-hidden="true" class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
<script src="{{ asset('js/app.js') }}"></script>
|
<script src="{{ asset('js/app.js') }}"></script>
|
||||||
<script src="{{ asset('js/jquery.js') }}"></script>
|
<script src="{{ asset('js/jquery.js') }}"></script>
|
||||||
|
@ -203,6 +250,78 @@ class="relative left-[calc(50%+3rem)] aspect-[1155/678] w-[36.125rem] -translate
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
function buttonSubmit() {
|
||||||
|
if ($('#remember').prop('checked')) {
|
||||||
|
ajax();
|
||||||
|
} else {
|
||||||
|
Toast.toggle('请您确认知情友链申请要求','<i class="bi bi-check-circle text-green-500"></i>');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class Toast {
|
||||||
|
static toggle(data,icon) {
|
||||||
|
this.set(data,icon);
|
||||||
|
$('#toast').fadeIn(300);
|
||||||
|
setTimeout(function () {
|
||||||
|
$('#toast').fadeOut(300);
|
||||||
|
}, 3000);
|
||||||
|
}
|
||||||
|
static set(data,icon) {
|
||||||
|
$('#toast-icon').html(icon);
|
||||||
|
$('#toast-info').text(data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class Enum {
|
||||||
|
static userEmail = '用户邮箱';
|
||||||
|
static userServerHost = '服务商';
|
||||||
|
static userBlog = '博客名字';
|
||||||
|
static userUrl = '博客地址';
|
||||||
|
static userDescription = '博客描述';
|
||||||
|
static userIcon = '图片地址';
|
||||||
|
static checkRssJudge = 'RSS选项';
|
||||||
|
static userRss = 'RSS地址';
|
||||||
|
static userLocation = '所属位置';
|
||||||
|
static userSelColor = '选择颜色';
|
||||||
|
static userRemark = '留言备注';
|
||||||
|
}
|
||||||
|
|
||||||
|
function ajax() {
|
||||||
|
$.ajax({
|
||||||
|
async: true,
|
||||||
|
method: "POST",
|
||||||
|
data: $('#FormData').serialize(),
|
||||||
|
url: '{{ route('api.link.custom.add') }}',
|
||||||
|
dataType: "json",
|
||||||
|
success: function (returnData) {
|
||||||
|
if (returnData.output === "Success") {
|
||||||
|
Toast.toggle('友链申请成功','<i class="bi bi-check-circle text-green-500"></i>');
|
||||||
|
location.href = '{{ route('home') }}'
|
||||||
|
} else {
|
||||||
|
Toast('未知错误','<i class="bi bi-x-circle text-red-500"></i>');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function (returnData) {
|
||||||
|
Toast.set('其他错误','<i class="bi bi-x-circle text-red-500"></i>');
|
||||||
|
if (returnData.responseJSON.output === 'DataFormatError') {
|
||||||
|
for (let key in Enum) {
|
||||||
|
if (returnData.responseJSON.data.errorSingle.info === key) {
|
||||||
|
Toast.toggle(Enum[key]+'错误,注意格式','<i class="bi bi-x-circle text-red-500"></i>');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if (returnData.responseJSON.output === "AlreadyUser") {
|
||||||
|
$('#toast-interactive').fadeIn(300);
|
||||||
|
$('#edit-friend').attr('href',"{{ route('function.edit-search') }}?searchName="+$('#userBlog').val()+"&searchUrl="+$('#userUrl').val());
|
||||||
|
setTimeout(function () {
|
||||||
|
$('#toast-interactive').fadeOut(300);
|
||||||
|
}, 10000);
|
||||||
|
} else {
|
||||||
|
Toast.toggle('未知错误','<i class="bi bi-x-circle text-red-500"></i>');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
{!! $webFooter !!}
|
{!! $webFooter !!}
|
||||||
</html>
|
</html>
|
||||||
|
|
61
resources/views/mail/link-custom-add.blade.php
Normal file
61
resources/views/mail/link-custom-add.blade.php
Normal file
|
@ -0,0 +1,61 @@
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||||
|
<title>Mail</title>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||||
|
</head>
|
||||||
|
<table align="center" border="0" cellpadding="0" cellspacing="0" width="600" style="border-collapse: collapse;border: 1px solid #cccccc;box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175)">
|
||||||
|
<tr>
|
||||||
|
<td align="center" bgcolor="#70bbd9" style="padding: 30px 0 30px 0; font-size: 30px;">$G_TitleName</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="padding: 30px 30px 30px 30px;">
|
||||||
|
<tr>
|
||||||
|
<td style="padding: 10px 0px 30px 0px;color: #08212b; font-family: Arial, sans-serif; font-size: 10px;">
|
||||||
|
时间: <b>{{ date('Y-m-d H:i:s') }}</b>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="padding: 0px 0px 10px 0px;color: #000000; font-family: Arial, sans-serif; font-size: 24px;">
|
||||||
|
Dear. <a style="text-decoration: none;color: #198754;" href="mailto:{{ $userEmail }}">{{ $userEmail }}</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="padding: 0px 5px 5px 0px;color: #000000; font-family: Arial, sans-serif; font-size: 16px;">
|
||||||
|
您好 <a style="text-decoration: none;color: #198754;" href="{{ $userUrl }}"><b>{{ $userBlog }}</b></a> 的站长:<b>{{ $userEmail }}</b><br/>
|
||||||
|
您在本博客(<a style="text-decoration: none;color: #198754;" href="{{ env('APP_BLOG') }}">{{ env('APP_NAME') }}</a>)申请了友链<br/>
|
||||||
|
<hr style="padding: 0px 5px 5px 0px;"/>
|
||||||
|
请在确认一次您的信息是否正确:<br/>
|
||||||
|
<ul>
|
||||||
|
<li>博主邮箱:{{ $userEmail }}</li>
|
||||||
|
<li>贵站名字:{{ $userBlog }}</li>
|
||||||
|
<li>贵站地址:{{ $userUrl }}</li>
|
||||||
|
<li>图片地址:{{ $userIcon }}</li>
|
||||||
|
<li>贵站介绍:{{ $userDescription }}</li>
|
||||||
|
<li>备注内容:{{ $userRemark }}</li>
|
||||||
|
<li>RSS地址:{{ $userRSS }}</li>
|
||||||
|
</ul>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td bgcolor="#f0f0f0" style="padding: 30px 20px 30px 20px;">
|
||||||
|
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||||||
|
<tr>
|
||||||
|
<td style="font-family: Arial, sans-serif; font-size: 14px;">
|
||||||
|
<font style="color: grey;">© 2022 - {{ date('Y') }}. {{ env('APP_NAME') }} All Rights Reserved.</font><br/>
|
||||||
|
<font style="color: grey;">本邮件为自动发出,请勿直接回复</font>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<tr>
|
||||||
|
<td style="padding: 30px 0 20px 0;"></td>
|
||||||
|
</tr>
|
||||||
|
</html>
|
|
@ -6,6 +6,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use App\Http\Controllers\Authme;
|
use App\Http\Controllers\Authme;
|
||||||
|
use App\Http\Controllers\Function\Link;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Support\Facades\Auth;
|
||||||
use Illuminate\Support\Facades\Response;
|
use Illuminate\Support\Facades\Response;
|
||||||
|
@ -26,7 +27,7 @@
|
||||||
return $request->user();
|
return $request->user();
|
||||||
});
|
});
|
||||||
|
|
||||||
Route::prefix('api')->group(function () {
|
// 登陆类
|
||||||
Route::prefix('auth')->group(function () {
|
Route::prefix('auth')->group(function () {
|
||||||
Route::post('login',[Authme::class,'Login'])->name('api.auth.login');
|
Route::post('login',[Authme::class,'Login'])->name('api.auth.login');
|
||||||
Route::post('register',[Authme::class,'Register'])->name('api.auth.register');
|
Route::post('register',[Authme::class,'Register'])->name('api.auth.register');
|
||||||
|
@ -35,4 +36,14 @@
|
||||||
return Response::redirectTo('');
|
return Response::redirectTo('');
|
||||||
})->name('logout');
|
})->name('logout');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 友链类
|
||||||
|
Route::prefix('link')->group(function () {
|
||||||
|
Route::prefix('console')->group(function () {
|
||||||
|
|
||||||
|
});
|
||||||
|
Route::prefix('custom')->group(function () {
|
||||||
|
Route::post('add',[Link::class,'apiCustomAdd'])->name('api.link.custom.add');
|
||||||
|
Route::get('search',[Link::class, 'apiCustomSearch'])->name('api.link.custom.search');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -29,8 +29,10 @@
|
||||||
Route::get('about',[Index::class,'ViewAboutMe'])->name('about');
|
Route::get('about',[Index::class,'ViewAboutMe'])->name('about');
|
||||||
|
|
||||||
Route::prefix('function')->group(function () {
|
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('make-friend',[UserLink::class, 'viewMakeFriend'])->name('function.make-friend');
|
||||||
|
Route::get('edit-search',[UserLink::class, 'viewSearchFriends'])->name('function.edit-search');
|
||||||
|
Route::get('edit-friend',[UserLink::class, 'viewEditFriend'])->name('function.edit-friend');
|
||||||
Route::get('sponsor',function () {
|
Route::get('sponsor',function () {
|
||||||
return view('function.sponsor');
|
return view('function.sponsor');
|
||||||
})->name('function.sponsor');
|
})->name('function.sponsor');
|
||||||
|
@ -39,6 +41,13 @@
|
||||||
})->name('function.music');
|
})->name('function.music');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Route::prefix('account')->middleware('auth')->group(function () {
|
||||||
|
Route::prefix('friend')->group(function () {
|
||||||
|
Route::get('link')->name('account.friend.link');
|
||||||
|
Route::get('edit')->name('account.friend.edit');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
Route::prefix('console')->middleware('auth')->group(function () {
|
Route::prefix('console')->middleware('auth')->group(function () {
|
||||||
Route::get('dashboard', [Dashboard::class,'ViewDashboard'])->name('console.dashboard');
|
Route::get('dashboard', [Dashboard::class,'ViewDashboard'])->name('console.dashboard');
|
||||||
Route::prefix('friends-link')->group(function () {
|
Route::prefix('friends-link')->group(function () {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user