样式及详情等
This commit is contained in:
parent
a0aa7fd81c
commit
ac85b2558a
@ -10,10 +10,19 @@ class ProgramQueryController extends BaseController
|
|||||||
{
|
{
|
||||||
public function index(Request $request) {
|
public function index(Request $request) {
|
||||||
$keyword = $request->get("keyword", "");
|
$keyword = $request->get("keyword", "");
|
||||||
$programs = Programs::query()->with(["appends", "video_pivots.video"])->where("status", "=", 1)->limit(15)->orderByDesc("created_at")->get();
|
$programs = Programs::query()->with(["appends", "video_pivots.video"])
|
||||||
|
->where("status", "=", 1)->limit(15)->orderByDesc("created_at")
|
||||||
|
->paginate();
|
||||||
return view("program.index", [
|
return view("program.index", [
|
||||||
"keyword" => $keyword,
|
"keyword" => $keyword,
|
||||||
"programs"=>$programs,
|
"programs"=>$programs,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function videos(Request $request, Programs $program) {
|
||||||
|
return view("program.video.index", [
|
||||||
|
"program" => $program,
|
||||||
|
"videos" => $program->video_pivots,
|
||||||
|
]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -37,9 +37,10 @@ class ProgramVideoConstructController extends BaseController
|
|||||||
$full_path = Storage::url($path);
|
$full_path = Storage::url($path);
|
||||||
$program_video->stop_image = str_replace("jerryyan.top", "jerryyan.net", $full_path);
|
$program_video->stop_image = str_replace("jerryyan.top", "jerryyan.net", $full_path);
|
||||||
}
|
}
|
||||||
|
$program_video->created_at = $request->post("created_at");
|
||||||
$program_video->update($updatePayload);
|
$program_video->update($updatePayload);
|
||||||
return view("program.construct.video.create", [
|
return redirect(route("program.construct.video.list", [
|
||||||
"program_video" => $program_video
|
"program"=>$program_video->program_id
|
||||||
]);
|
]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@ class Programs extends Model
|
|||||||
|
|
||||||
public function video_pivots(): \Illuminate\Database\Eloquent\Relations\HasMany
|
public function video_pivots(): \Illuminate\Database\Eloquent\Relations\HasMany
|
||||||
{
|
{
|
||||||
return $this->hasMany(ProgramVideos::class, "program_id", "id");
|
return $this->hasMany(ProgramVideos::class, "program_id", "id")->orderBy("created_at");
|
||||||
}
|
}
|
||||||
|
|
||||||
public function videos(): \Illuminate\Database\Eloquent\Relations\HasManyThrough
|
public function videos(): \Illuminate\Database\Eloquent\Relations\HasManyThrough
|
||||||
|
1209
public/css/app.css
1209
public/css/app.css
File diff suppressed because one or more lines are too long
19696
public/js/app.js
19696
public/js/app.js
File diff suppressed because one or more lines are too long
@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"/js/app.js": "/js/app.js?id=f775b77a8886d46e619d4d79272ec38d",
|
"/js/app.js": "/js/app.js?id=118ad1c7656e9b1feb9634a5ed494f76",
|
||||||
"/css/app.css": "/css/app.css?id=3aa5b50b5993b45cf8b45f2a31c3e3c6"
|
"/css/app.css": "/css/app.css?id=009ea0c84289f2756329452a0f5516ed"
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
@include("common.header")
|
@include("common.header")
|
||||||
<form action="">
|
<form class="form" action="">
|
||||||
<label for="keyword">查找节目单关键词,空格隔开查找多个关键词</label>
|
<label for="keyword">查找节目单关键词,空格隔开查找多个关键词</label>
|
||||||
<input class="border border-black" type="text" name="keyword" id="keyword" value="{{$keyword}}">
|
<input class="border border-black" type="text" name="keyword" id="keyword" value="{{$keyword}}">
|
||||||
<input class="border border-black" type="submit">
|
<input class="border border-black" type="submit">
|
||||||
|
@ -28,6 +28,10 @@
|
|||||||
@endif
|
@endif
|
||||||
<input class="form-input border-0 border-b-2 w-full" type="file" name="start_image">
|
<input class="form-input border-0 border-b-2 w-full" type="file" name="start_image">
|
||||||
</label>
|
</label>
|
||||||
|
<label class="block my-2">
|
||||||
|
节目开打时间
|
||||||
|
<input class="form-input border-0 border-b-2 w-full" type="datetime-local" step="1" name="created_at" value="{{$program_video->created_at}}">
|
||||||
|
</label>
|
||||||
<label class="block my-2">
|
<label class="block my-2">
|
||||||
结束P数
|
结束P数
|
||||||
<input class="form-input border-0 border-b-2 w-full" type="number" name="stop_part" value="{{$program_video->stop_part}}">
|
<input class="form-input border-0 border-b-2 w-full" type="number" name="stop_part" value="{{$program_video->stop_part}}">
|
||||||
|
@ -21,13 +21,17 @@
|
|||||||
@foreach($videos as $video_pivot)
|
@foreach($videos as $video_pivot)
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<a class="text-purple-600 underline" target="_blank"
|
<a class="underline" target="_blank"
|
||||||
href="https://www.bilibili.com/video/{{$video_pivot->video_bvid}}?p={{$video_pivot->start_part}}&t={{$video_pivot->start_sec}}"
|
href="https://www.bilibili.com/video/{{$video_pivot->video_bvid}}?p={{$video_pivot->start_part}}&t={{$video_pivot->start_sec}}"
|
||||||
title="P{{$video_pivot->start_part}}#{{$video_pivot->start_time}}"
|
title="P{{$video_pivot->start_part}}#{{$video_pivot->start_time}}"
|
||||||
>{{$video_pivot->video_bvid}}</a>
|
>{{$video_pivot->video_bvid}}</a>
|
||||||
</td>
|
</td>
|
||||||
<td>P{{$video_pivot->start_part}} {{$video_pivot->start_time}}</td>
|
<td>{{$video_pivot->created_at}}</td>
|
||||||
<td>
|
<td>
|
||||||
|
<a class="underline block" target="_blank"
|
||||||
|
href="https://www.bilibili.com/video/{{$video_pivot->video_bvid}}?p={{$video_pivot->start_part}}&t={{$video_pivot->start_sec}}"
|
||||||
|
title="P{{$video_pivot->start_part}}#{{$video_pivot->start_time}}"
|
||||||
|
>P{{$video_pivot->start_part}}#{{$video_pivot->start_time}}</a>
|
||||||
@if($video_pivot->start_image)
|
@if($video_pivot->start_image)
|
||||||
<img width="300" src="{{$video_pivot->start_image}}" alt="开始时的画面">
|
<img width="300" src="{{$video_pivot->start_image}}" alt="开始时的画面">
|
||||||
@else
|
@else
|
||||||
@ -35,6 +39,10 @@
|
|||||||
@endif
|
@endif
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
|
<a class="underline" target="_blank"
|
||||||
|
href="https://www.bilibili.com/video/{{$video_pivot->video_bvid}}?p={{$video_pivot->stop_part}}&t={{$video_pivot->stop_sec}}"
|
||||||
|
title="P{{$video_pivot->stop_part}}#{{$video_pivot->stop_time}}"
|
||||||
|
>P{{$video_pivot->stop_part}}#{{$video_pivot->stop_time}}</a>
|
||||||
@if($video_pivot->stop_image)
|
@if($video_pivot->stop_image)
|
||||||
<img width="300" src="{{$video_pivot->stop_image}}" alt="结束时的画面">
|
<img width="300" src="{{$video_pivot->stop_image}}" alt="结束时的画面">
|
||||||
@else
|
@else
|
||||||
|
@ -18,19 +18,19 @@
|
|||||||
<tr class="border border-black sticky bg-white lg:static top-0 left-0 right-0">
|
<tr class="border border-black sticky bg-white lg:static top-0 left-0 right-0">
|
||||||
<th class="border border-black">节目名称</th>
|
<th class="border border-black">节目名称</th>
|
||||||
<th class="border border-black">点播及追加</th>
|
<th class="border border-black">点播及追加</th>
|
||||||
<th class="border border-black">节目开始</th>
|
<th class="border border-black hidden lg:table-cell">节目开始</th>
|
||||||
<th class="border border-black">节目结束</th>
|
<th class="border border-black hidden lg:table-cell">节目结束</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach($programs as $program)
|
@foreach($programs as $program)
|
||||||
<tr>
|
<tr>
|
||||||
<td class="border">
|
<td class="border">
|
||||||
|
<a href="/programs/{{ $program->id }}/video">
|
||||||
<span title="节目">{{$program->name}}</span>
|
<span title="节目">{{$program->name}}</span>
|
||||||
<span title="难度">{{$program->difficulty}}</span>
|
<span title="难度">{{$program->difficulty}}</span>
|
||||||
<span title="要求">{{$program->desc}}</span>
|
<span title="要求">{{$program->desc}}</span>
|
||||||
<br>
|
</a>
|
||||||
<span title="开打的时间">{{$program->created_at}}</span>
|
|
||||||
</td>
|
</td>
|
||||||
<td class="border">
|
<td class="border">
|
||||||
@foreach($program->appends as $append)
|
@foreach($program->appends as $append)
|
||||||
@ -90,45 +90,43 @@
|
|||||||
<a href="{{route('program.construct.append.list', ['program'=>$program->id])}}">去建设</a>
|
<a href="{{route('program.construct.append.list', ['program'=>$program->id])}}">去建设</a>
|
||||||
@endif
|
@endif
|
||||||
</td>
|
</td>
|
||||||
<td class="border">
|
<td class="border hidden lg:table-cell">
|
||||||
@foreach($program->video_pivots as $video_pivot)
|
@foreach($program->video_pivots as $video_pivot)
|
||||||
<a
|
<a class="block"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
href="https://www.bilibili.com/video/{{$video_pivot->video_bvid}}?p={{$video_pivot->start_part}}&t={{$video_pivot->start_sec}}"
|
href="https://www.bilibili.com/video/{{$video_pivot->video_bvid}}?p={{$video_pivot->start_part}}&t={{$video_pivot->start_sec}}"
|
||||||
title="P{{$video_pivot->start_part}}#{{$video_pivot->start_time}}"
|
title="P{{$video_pivot->start_part}}#{{$video_pivot->start_time}}"
|
||||||
>
|
>
|
||||||
|
<div>{{$video_pivot->created_at}} P{{$video_pivot->start_part}}#{{$video_pivot->start_time}}</div>
|
||||||
@if($video_pivot->start_image)
|
@if($video_pivot->start_image)
|
||||||
<img width="300" src="{{$video_pivot->start_image}}" alt="开始时的画面">
|
<img width="300" src="{{$video_pivot->start_image}}" alt="开始时的画面">
|
||||||
@else
|
@else
|
||||||
节目开始位置
|
节目开始位置
|
||||||
<a href="{{route('program.construct.video.edit', ['program_video'=>$video_pivot->id])}}">去建设</a>
|
|
||||||
@endif
|
@endif
|
||||||
</a>
|
</a>
|
||||||
@endforeach
|
@endforeach
|
||||||
</td>
|
</td>
|
||||||
<td class="border">
|
<td class="border hidden lg:table-cell">
|
||||||
@foreach($program->video_pivots as $video_pivot)
|
@foreach($program->video_pivots as $video_pivot)
|
||||||
@if($video_pivot->stop_part)
|
<a class="block"
|
||||||
<a
|
|
||||||
target="_blank"
|
target="_blank"
|
||||||
href="https://www.bilibili.com/video/{{$video_pivot->video_bvid}}?p={{$video_pivot->stop_part}}&t={{$video_pivot->stop_sec}}"
|
href="https://www.bilibili.com/video/{{$video_pivot->video_bvid}}?p={{$video_pivot->stop_part}}&t={{$video_pivot->stop_sec}}"
|
||||||
title="P{{$video_pivot->stop_part}}#{{$video_pivot->stop_time}}"
|
title="P{{$video_pivot->stop_part}}#{{$video_pivot->stop_time}}"
|
||||||
>
|
>
|
||||||
|
<div>P{{$video_pivot->stop_part}}#{{$video_pivot->stop_time}}</div>
|
||||||
@if($video_pivot->start_image)
|
@if($video_pivot->start_image)
|
||||||
<img width="300" src="{{$video_pivot->stop_image}}" alt="结束时的画面">
|
<img width="300" src="{{$video_pivot->stop_image}}" alt="结束时的画面">
|
||||||
@else
|
@else
|
||||||
节目结束位置
|
节目结束位置
|
||||||
@endif
|
@endif
|
||||||
</a>
|
</a>
|
||||||
@else
|
|
||||||
<a href="{{route('program.construct.video.edit', ['program_video'=>$video_pivot->id])}}">去建设</a>
|
|
||||||
@endif
|
|
||||||
@endforeach
|
@endforeach
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@endforeach
|
@endforeach
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
{{$programs->links()}}
|
||||||
@include("common.footer")
|
@include("common.footer")
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
116
resources/views/program/video/index.blade.php
Normal file
116
resources/views/program/video/index.blade.php
Normal file
@ -0,0 +1,116 @@
|
|||||||
|
<html lang="zh">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>录播节目查询</title>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<link href="{{ mix('/css/app.css') }}" rel="stylesheet"/>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
@include("common.header")
|
||||||
|
<div class="border-2 lg:w-1/2 w-full">
|
||||||
|
<div class="text-lg font-bold">
|
||||||
|
<span title="节目">{{$program->name}}</span>
|
||||||
|
<span title="难度">{{$program->difficulty}}</span>
|
||||||
|
<span title="要求">{{$program->desc}}</span>
|
||||||
|
</div>
|
||||||
|
<div class="ml-2">
|
||||||
|
@foreach($program->appends as $append)
|
||||||
|
@if($append->is_original)
|
||||||
|
<div>
|
||||||
|
@switch($append->platform_id)
|
||||||
|
@case(1)
|
||||||
|
<img class="w-4 h-4 inline-block" src="https://cdn.jerryyan.net/luboimg/bilibili.ico" alt="B站">
|
||||||
|
<a class="underline" href="https://space.bilibili.com/{{$append->from_mid}}" target="_blank">{{$append->from}}</a>
|
||||||
|
@break
|
||||||
|
@case(2)
|
||||||
|
<img class="w-4 h-4 inline-block" src="https://cdn.jerryyan.net/luboimg/ixigua.ico" alt="西瓜视频">
|
||||||
|
<a class="underline" href="https://www.ixigua.com/home/{{$append->from_mid}}/" target="_blank">{{$append->from}}</a>
|
||||||
|
@break
|
||||||
|
@case(3)
|
||||||
|
<img class="w-4 h-4 inline-block" src="https://cdn.jerryyan.net/luboimg/douyin.ico" alt="抖音">
|
||||||
|
{{$append->from}}
|
||||||
|
@break
|
||||||
|
@default
|
||||||
|
{{$append->from}}
|
||||||
|
@break
|
||||||
|
@endswitch
|
||||||
|
老板点播
|
||||||
|
<span title="一分10块">{{$append->price}}分</span>
|
||||||
|
@if($append->append)
|
||||||
|
<span>({{$append->append}})</span>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
@else
|
||||||
|
<div>
|
||||||
|
@switch($append->platform_id)
|
||||||
|
@case(1)
|
||||||
|
<img class="w-4 h-4 inline-block" src="https://cdn.jerryyan.net/luboimg/bilibili.ico" alt="B站">
|
||||||
|
<a class="underline" href="https://space.bilibili.com/{{$append->from_mid}}" target="_blank">{{$append->from}}</a>
|
||||||
|
@break
|
||||||
|
@case(2)
|
||||||
|
<img class="w-4 h-4 inline-block" src="https://cdn.jerryyan.net/luboimg/ixigua.ico" alt="西瓜视频">
|
||||||
|
<a class="underline" href="https://www.ixigua.com/home/{{$append->from_mid}}/" target="_blank">{{$append->from}}</a>
|
||||||
|
@break
|
||||||
|
@case(3)
|
||||||
|
<img class="w-4 h-4 inline-block" src="https://cdn.jerryyan.net/luboimg/douyin.ico" alt="抖音">
|
||||||
|
{{$append->from}}
|
||||||
|
@break
|
||||||
|
@default
|
||||||
|
{{$append->from}}
|
||||||
|
@break
|
||||||
|
@endswitch
|
||||||
|
老板追加:{{$append->name}}
|
||||||
|
<span title="一分10块">{{$append->price}}分</span>
|
||||||
|
@if($append->append)
|
||||||
|
<span>({{$append->append}})</span>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
@endforeach
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<table class="table-auto border-collapse w-full lg:border lg:border-black">
|
||||||
|
<thead>
|
||||||
|
<tr class="border border-black sticky bg-white lg:static top-0 left-0 right-0">
|
||||||
|
<td>节目开始时的画面</td>
|
||||||
|
<td>节目结束时的画面</td>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
@foreach($videos as $video_pivot)
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<a class="block"
|
||||||
|
target="_blank"
|
||||||
|
href="https://www.bilibili.com/video/{{$video_pivot->video_bvid}}?p={{$video_pivot->start_part}}&t={{$video_pivot->start_sec}}"
|
||||||
|
title="P{{$video_pivot->start_part}}#{{$video_pivot->start_time}}"
|
||||||
|
>
|
||||||
|
<div>{{$video_pivot->created_at}} P{{$video_pivot->start_part}}#{{$video_pivot->start_time}}</div>
|
||||||
|
@if($video_pivot->start_image)
|
||||||
|
<img width="300" src="{{$video_pivot->start_image}}" alt="开始时的画面">
|
||||||
|
@else
|
||||||
|
节目开始位置
|
||||||
|
@endif
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<a class="block"
|
||||||
|
target="_blank"
|
||||||
|
href="https://www.bilibili.com/video/{{$video_pivot->video_bvid}}?p={{$video_pivot->stop_part}}&t={{$video_pivot->stop_sec}}"
|
||||||
|
title="P{{$video_pivot->stop_part}}#{{$video_pivot->stop_time}}"
|
||||||
|
>
|
||||||
|
<div>P{{$video_pivot->stop_part}}#{{$video_pivot->stop_time}}</div>
|
||||||
|
@if($video_pivot->start_image)
|
||||||
|
<img width="300" src="{{$video_pivot->stop_image}}" alt="结束时的画面">
|
||||||
|
@else
|
||||||
|
节目结束位置
|
||||||
|
@endif
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
@endforeach
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
@include("common.footer")
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -15,6 +15,7 @@ use Illuminate\Support\Facades\Route;
|
|||||||
// 对外列表
|
// 对外列表
|
||||||
Route::get('/', ["\\App\\Http\\Controllers\\CommentQueryController","index"]);
|
Route::get('/', ["\\App\\Http\\Controllers\\CommentQueryController","index"]);
|
||||||
Route::get('/programs', ["\\App\\Http\\Controllers\\ProgramQueryController","index"]);
|
Route::get('/programs', ["\\App\\Http\\Controllers\\ProgramQueryController","index"]);
|
||||||
|
Route::get('/programs/{program}/video', ["\\App\\Http\\Controllers\\ProgramQueryController","videos"]);
|
||||||
Route::get('/danmakus', ["\\App\\Http\\Controllers\\DanmakuQueryController","index"]);
|
Route::get('/danmakus', ["\\App\\Http\\Controllers\\DanmakuQueryController","index"]);
|
||||||
Route::get('/danmakus/{bvid}', ["\\App\\Http\\Controllers\\DanmakuQueryController","specific_search"]);
|
Route::get('/danmakus/{bvid}', ["\\App\\Http\\Controllers\\DanmakuQueryController","specific_search"]);
|
||||||
Route::get('/upload', ["\\App\\Http\\Controllers\\FileController","index"]);
|
Route::get('/upload', ["\\App\\Http\\Controllers\\FileController","index"]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user