From b9a46390e0efaf3c44bc1461c0a4c628df763374 Mon Sep 17 00:00:00 2001
From: Jerry Yan <792602257@qq.com>
Date: Sat, 30 Jul 2022 11:20:13 +0800
Subject: [PATCH] =?UTF-8?q?=E7=BB=84=E4=BB=B6=E6=8A=BD=E8=B1=A1?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/View/Components/Append.php | 34 +++++++++
app/View/Components/Links/UserLink.php | 43 +++++++++++
app/View/Components/Links/VideoLink.php | 57 +++++++++++++++
resources/views/components/append.blade.php | 19 +++++
.../components/links/user_link.blade.php | 27 +++++++
.../components/links/video_link.blade.php | 7 ++
.../views/danmaku/search_index.blade.php | 18 +----
.../views/program/construct/index.blade.php | 53 ++++----------
resources/views/program/index.blade.php | 71 ++-----------------
9 files changed, 206 insertions(+), 123 deletions(-)
create mode 100644 app/View/Components/Append.php
create mode 100644 app/View/Components/Links/UserLink.php
create mode 100644 app/View/Components/Links/VideoLink.php
create mode 100644 resources/views/components/append.blade.php
create mode 100644 resources/views/components/links/user_link.blade.php
create mode 100644 resources/views/components/links/video_link.blade.php
diff --git a/app/View/Components/Append.php b/app/View/Components/Append.php
new file mode 100644
index 0000000..b8ecb88
--- /dev/null
+++ b/app/View/Components/Append.php
@@ -0,0 +1,34 @@
+append = $append;
+ }
+
+ /**
+ * Get the view / contents that represent the component.
+ *
+ * @return \Illuminate\Contracts\View\View|\Closure|string
+ */
+ public function render()
+ {
+ return view('components.append');
+ }
+}
diff --git a/app/View/Components/Links/UserLink.php b/app/View/Components/Links/UserLink.php
new file mode 100644
index 0000000..77ff43c
--- /dev/null
+++ b/app/View/Components/Links/UserLink.php
@@ -0,0 +1,43 @@
+plt_id = $pltId;
+ $this->mid = $mid;
+ $this->name = $name;
+ }
+
+ /**
+ * Get the view / contents that represent the component.
+ *
+ * @return \Illuminate\Contracts\View\View|\Closure|string
+ */
+ public function render()
+ {
+ return view('components.links.user_link');
+ }
+}
diff --git a/app/View/Components/Links/VideoLink.php b/app/View/Components/Links/VideoLink.php
new file mode 100644
index 0000000..4618a24
--- /dev/null
+++ b/app/View/Components/Links/VideoLink.php
@@ -0,0 +1,57 @@
+bvid = $bvid;
+ $this->part = $part;
+ if ($sec == null) {
+ try {
+ $sec = Carbon::createFromFormat("H:i:s", $time)->secondsSinceMidnight();
+ } catch (InvalidFormatException $ex) {
+ $time = null;
+ }
+ }
+ $this->time = $time;
+ $this->sec = $sec;
+ }
+
+ /**
+ * Get the view / contents that represent the component.
+ *
+ * @return \Illuminate\Contracts\View\View|\Closure|string
+ */
+ public function render()
+ {
+ return view('components.links.video_link');
+ }
+}
diff --git a/resources/views/components/append.blade.php b/resources/views/components/append.blade.php
new file mode 100644
index 0000000..c46ac1a
--- /dev/null
+++ b/resources/views/components/append.blade.php
@@ -0,0 +1,19 @@
+@if($append->is_original)
+
+
+ 老板点播
+ {{$append->price}}分
+ @if($append->append)
+ ({{$append->append}})
+ @endif
+
+@else
+
+
+ 老板追加@if($append->broadcast!=0)常驻留言@endif:{{$append->name}}
+ {{$append->price}}分
+ @if($append->append)
+ ({{$append->append}})
+ @endif
+
+@endif
diff --git a/resources/views/components/links/user_link.blade.php b/resources/views/components/links/user_link.blade.php
new file mode 100644
index 0000000..302d4b9
--- /dev/null
+++ b/resources/views/components/links/user_link.blade.php
@@ -0,0 +1,27 @@
+
+ @switch($plt_id)
+ @case(1)
+
+ @isset($mid)
+ {{$name}}
+ @else
+ {{$name}}
+ @endisset
+ @break
+ @case(2)
+
+ @isset($mid)
+ {{$name}}
+ @else
+ {{$name}}
+ @endisset
+ @break
+ @case(3)
+
+ {{$name}}
+ @break
+ @default
+ {{$name}}
+ @break
+ @endswitch
+
diff --git a/resources/views/components/links/video_link.blade.php b/resources/views/components/links/video_link.blade.php
new file mode 100644
index 0000000..c2fe9b8
--- /dev/null
+++ b/resources/views/components/links/video_link.blade.php
@@ -0,0 +1,7 @@
+
+ {{ $slot }}
+
diff --git a/resources/views/danmaku/search_index.blade.php b/resources/views/danmaku/search_index.blade.php
index 24f1c52..5926cc2 100644
--- a/resources/views/danmaku/search_index.blade.php
+++ b/resources/views/danmaku/search_index.blade.php
@@ -28,23 +28,7 @@
@foreach($danmakus as $danmaku)
- @switch($danmaku->platform_id)
- @case(1)
-
- {{$danmaku->from}}
- @break
- @case(2)
-
- {{$danmaku->from}}
- @break
- @case(3)
-
- {{$danmaku->from}}
- @break
- @default
- {{$danmaku->from}}
- @break
- @endswitch
+
|
{{$danmaku->content}} |
{{$danmaku->created_at}} |
diff --git a/resources/views/program/construct/index.blade.php b/resources/views/program/construct/index.blade.php
index ca9e089..f12a548 100644
--- a/resources/views/program/construct/index.blade.php
+++ b/resources/views/program/construct/index.blade.php
@@ -22,63 +22,36 @@
$program->id])}}">编辑
{{$program->name}}
+ {{$program->difficulty}}
{{$program->desc}}
|
@foreach($program->appends as $append)
- @if($append->is_original)
-
- @if($append->from_mid)
- {{$append->from}}
- @else
- {{$append->from}}
- @endif
- 老板点播
- {{$append->price}}分
- @if($append->append)
- ({{$append->append}})
- @endif
-
- @else
-
- @if($append->from_mid)
- {{$append->from}}
- @else
- {{$append->from}}
- @endif
- 老板追加:{{$append->name}}
- {{$append->price}}分
- @if($append->append)
- ({{$append->append}})
- @endif
-
- @endif
+
@endforeach
|
@foreach($program->video_pivots as $video_pivot)
-
+
+ {{$video_pivot->created_at}} P{{$video_pivot->start_part}}#{{$video_pivot->start_time}}
@if($video_pivot->start_image)
@else
节目开始位置
@endif
-
+
@endforeach
|
@foreach($program->video_pivots as $video_pivot)
- @if($video_pivot->stop_image)
-
- @else
- 暂无
- @endif
+
+ P{{$video_pivot->stop_part}}#{{$video_pivot->stop_time}}
+ @if($video_pivot->start_image)
+
+ @else
+ 节目结束位置
+ @endif
+
@endforeach
|
diff --git a/resources/views/program/index.blade.php b/resources/views/program/index.blade.php
index 8e3517c..5a40790 100644
--- a/resources/views/program/index.blade.php
+++ b/resources/views/program/index.blade.php
@@ -34,92 +34,31 @@
@foreach($program->appends as $append)
- @if($append->is_original)
-
- @switch($append->platform_id)
- @case(1)
- 
- {{$append->from}}
- @break
- @case(2)
- 
- {{$append->from}}
- @break
- @case(3)
- 
- {{$append->from}}
- @break
- @default
- {{$append->from}}
- @break
- @endswitch
- 老板点播
- {{$append->price}}分
- @if($append->append)
- ({{$append->append}})
- @endif
-
- @else
-
- @switch($append->platform_id)
- @case(1)
- 
- {{$append->from}}
- @break
- @case(2)
- 
- {{$append->from}}
- @break
- @case(3)
- 
- {{$append->from}}
- @break
- @default
- {{$append->from}}
- @break
- @endswitch
- 老板追加:{{$append->name}}
- {{$append->price}}分
- @if($append->append)
- ({{$append->append}})
- @endif
-
- @endif
+
@endforeach
- @if(sizeof($program->appends) === 0)
- 去建设
- @endif
|
@foreach($program->video_pivots as $video_pivot)
-
+
{{$video_pivot->created_at}} P{{$video_pivot->start_part}}#{{$video_pivot->start_time}}
@if($video_pivot->start_image)
@else
节目开始位置
@endif
-
+
@endforeach
|
@foreach($program->video_pivots as $video_pivot)
-
+
P{{$video_pivot->stop_part}}#{{$video_pivot->stop_time}}
@if($video_pivot->start_image)
@else
节目结束位置
@endif
-
+
@endforeach
|