组件抽象

This commit is contained in:
2022-07-30 11:20:13 +08:00
parent 0d238c29af
commit b9a46390e0
9 changed files with 206 additions and 123 deletions

View File

@ -28,23 +28,7 @@
@foreach($danmakus as $danmaku)
<tr>
<td class="border">
@switch($danmaku->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/{{$danmaku->from_mid}}" target="_blank">{{$danmaku->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/{{$danmaku->from_mid}}/" target="_blank">{{$danmaku->from}}</a>
@break
@case(3)
<img class="w-4 h-4 inline-block" src="https://cdn.jerryyan.net/luboimg/douyin.ico" alt="抖音">
{{$danmaku->from}}
@break
@default
{{$danmaku->from}}
@break
@endswitch
<x-links.user_link :name="$danmaku->from" :plt-id="$danmaku->platform_id" :mid="$danmaku->from_mid"></x-links.user_link>
</td>
<td class="border">{{$danmaku->content}}</td>
<td class="border text-sm">{{$danmaku->created_at}}</td>