Files
SEONexus/code/app/home/view/videoGpt1/module/detail_main/desc.html

295 lines
10 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{// ===================== Desc Variants ===================== }
{php}
$intCurrentForgeId = (int)(request()->route('intVForgeId') ?? 0);
$strSeoCopyScene = $intCurrentForgeId > 0 ? 'forge' : 'detail';
{/php}
{video:seocopy scene="$strSeoCopyScene" video="$arrVideo" export_name="seoCopy" /}
{php}
$strDetailMainDescription = trim(preg_replace('/\s+/u', ' ', strip_tags((string)($arrVideo['v_description'] ?? ''))));
if ($strDetailMainDescription === '') {
$strDetailMainDescription = '当前内容暂无完整剧情简介,建议结合详情信息与播放入口继续判断。';
}
$arrPlayGroups = is_array($arrVideo['v_play_url'] ?? null) ? $arrVideo['v_play_url'] : [];
$strPrimaryPlayType = '';
$intPrimaryPlayIndex = 1;
if (!empty($arrPlayGroups)) {
$strPrimaryPlayType = (string)array_key_first($arrPlayGroups);
}
$strDetailSlug = trim((string)($arrVideo['v_name_en'] ?? request()->route('strPinyin') ?? ''));
if ($strDetailSlug === '') {
$strDetailSlug = (string)($arrVideo['v_id'] ?? '');
}
$strPreferredPlayUrl = '';
if ((int)($arrVideo['v_id'] ?? 0) > 0 && $strPrimaryPlayType !== '') {
$strPreferredPlayUrl = app(\app\services\VideoService::class)->getVideoPlayUrl(
(int)$arrVideo['v_id'],
$strDetailSlug,
$strPrimaryPlayType,
$intPrimaryPlayIndex
);
}
$boolIsForgeDetail = $intCurrentForgeId > 0;
$strOriginVideoName = trim((string)($arrVideo['v_name'] ?? ''));
$strMainVideoInfoUrl = '';
if ((int)($arrVideo['v_id'] ?? 0) > 0) {
$strMainVideoInfoUrl = app(\app\services\VideoService::class)->getVideoInfoUrl(
(int)$arrVideo['v_id'],
$strDetailSlug
);
}
$strDetailBody = trim((string)($seoCopy['detail_faq'] ?? ''));
$strDetailBodyLead = trim((string)($seoCopy['detail_body_lead'] ?? ''));
$strDetailPlayLinkLead = trim((string)($seoCopy['detail_play_link_lead'] ?? ''));
$strDetailBodyTail = trim((string)($seoCopy['detail_body_tail'] ?? ''));
$strForgeBodyLead = trim((string)($seoCopy['forge_body_lead'] ?? ''));
$strForgeReturnLead = trim((string)($seoCopy['forge_return_lead'] ?? ''));
if ($strForgeReturnLead === '') {
$strForgeReturnLead = '如果想回到标准详情,可返回';
}
$strForgePlayLead = trim((string)($seoCopy['forge_play_lead'] ?? ''));
$strForgeDetailNote = trim((string)($seoCopy['forge_detail_note'] ?? ''));
$arrGuideCards = array_values(array_filter((array)($seoCopy['guide_cards'] ?? []), static function ($arrCard): bool {
return is_array($arrCard)
&& (
trim((string)($arrCard['title'] ?? '')) !== ''
|| trim((string)($arrCard['text'] ?? '')) !== ''
);
}));
$arrForgeEntryLinks = [];
foreach ($arrGuideCards as $arrGuideCard) {
$strGuideTitle = trim((string)($arrGuideCard['title'] ?? ''));
$strGuideText = trim((string)($arrGuideCard['text'] ?? ''));
$strGuideLine = trim($strGuideTitle . ($strGuideText !== '' ? '' . $strGuideText : ''));
if ($strGuideLine !== '') {
$arrForgeEntryLinks[] = [
'url' => $strMainVideoInfoUrl !== '' ? $strMainVideoInfoUrl : '/',
'text' => $strGuideLine,
];
}
}
{/php}
<style>
.{$TpStyle.dom_prefix}-dm-desc,
.{$TpStyle.dom_prefix}-dm-desc-body,
.{$TpStyle.dom_prefix}-dm-desc-guide,
.{$TpStyle.dom_prefix}-dm-forge-note {
min-width: 0;
word-break: break-word;
}
.{$TpStyle.dom_prefix}-dm-desc p,
.{$TpStyle.dom_prefix}-dm-desc li,
.{$TpStyle.dom_prefix}-dm-desc blockquote,
.{$TpStyle.dom_prefix}-dm-desc summary,
.{$TpStyle.dom_prefix}-dm-desc-body p,
.{$TpStyle.dom_prefix}-dm-desc-guide p,
.{$TpStyle.dom_prefix}-dm-forge-note p {
font-size: 14px;
line-height: 1.78;
}
.{$TpStyle.dom_prefix}-dm-desc header,
.{$TpStyle.dom_prefix}-dm-desc summary {
font-size: 16px;
line-height: 1.45;
}
@media (max-width: 768px) {
.{$TpStyle.dom_prefix}-dm-desc p,
.{$TpStyle.dom_prefix}-dm-desc li,
.{$TpStyle.dom_prefix}-dm-desc blockquote,
.{$TpStyle.dom_prefix}-dm-desc summary,
.{$TpStyle.dom_prefix}-dm-desc-body p,
.{$TpStyle.dom_prefix}-dm-desc-guide p,
.{$TpStyle.dom_prefix}-dm-forge-note p {
font-size: 13px !important;
line-height: 1.74 !important;
}
.{$TpStyle.dom_prefix}-dm-desc header,
.{$TpStyle.dom_prefix}-dm-desc summary {
font-size: 15px !important;
}
.{$TpStyle.dom_prefix}-dm-desc-body,
.{$TpStyle.dom_prefix}-dm-desc-guide,
.{$TpStyle.dom_prefix}-dm-forge-note {
margin-top: 8px !important;
padding: 10px 10px !important;
border-radius: 12px !important;
}
}
</style>
{if $variant == 0}
<p class="{$TpStyle.dom_prefix}-dm-desc v0">
{$strDetailMainDescription}
</p>
{elseif $variant == 1}
<div class="{$TpStyle.dom_prefix}-dm-desc v1">
<p>{$strDetailMainDescription|mb_substr=0,120}</p>
</div>
{elseif $variant == 2}
<section class="{$TpStyle.dom_prefix}-dm-desc v2">
<p>{$strDetailMainDescription|mb_substr=0,200}</p>
</section>
{elseif $variant == 3}
<article class="{$TpStyle.dom_prefix}-dm-desc v3">
<p>{$strDetailMainDescription}</p>
</article>
{elseif $variant == 4}
<div class="{$TpStyle.dom_prefix}-dm-desc v4">
<p>
剧情简介:{$strDetailMainDescription|mb_substr=0,150}
</p>
</div>
{elseif $variant == 5}
<details class="{$TpStyle.dom_prefix}-dm-desc v5">
<summary>剧情介绍</summary>
<p>{$strDetailMainDescription}</p>
</details>
{elseif $variant == 6}
<div class="{$TpStyle.dom_prefix}-dm-desc v6">
<p>{$strDetailMainDescription|mb_substr=0,100}...</p>
<a href="#desc">查看详情</a>
</div>
{elseif $variant == 7}
<section class="{$TpStyle.dom_prefix}-dm-desc v7">
<header>影片简介</header>
<p>{$strDetailMainDescription|mb_substr=0,180}</p>
</section>
{elseif $variant == 8}
<div class="{$TpStyle.dom_prefix}-dm-desc v8">
<blockquote>
{$strDetailMainDescription|mb_substr=0,160}
</blockquote>
</div>
{elseif $variant == 9}
<p class="{$TpStyle.dom_prefix}-dm-desc v9">
{$arrVideo.v_name}{$arrVideo.v_year})剧情:
{$strDetailMainDescription|mb_substr=0,140}
</p>
{elseif $variant == 10}
<div class="{$TpStyle.dom_prefix}-dm-desc v10">
<p itemprop="description">
{$strDetailMainDescription|mb_substr=0,160}
</p>
</div>
{elseif $variant == 11}
<div class="{$TpStyle.dom_prefix}-dm-desc v11"
data-desc="{$strDetailMainDescription|mb_substr=0,200}">
<p>{$strDetailMainDescription|mb_substr=0,120}</p>
</div>
{elseif $variant == 12}
<section class="{$TpStyle.dom_prefix}-dm-desc v12">
<p>
{$strDetailMainDescription|mb_substr=0,100}
<span class="{$TpStyle.dom_prefix}-dm-desc-more">
{$arrVideo.v_name} 在线观看
</span>
</p>
</section>
{elseif $variant == 13}
<div class="{$TpStyle.dom_prefix}-dm-desc v13">
<p>
{$strDetailMainDescription|mb_substr=0,130}
高清完整版内容介绍。
</p>
</div>
{elseif $variant == 14}
<div class="{$TpStyle.dom_prefix}-dm-desc v14">
<p>
{$strDetailMainDescription|mb_substr=0,150}
</p>
<p class="{$TpStyle.dom_prefix}-dm-desc-note">
本片支持在线播放
</p>
</div>
{elseif $variant == 15}
<p class="{$TpStyle.dom_prefix}-dm-desc v15">
{$strDetailMainDescription|mb_substr=0,120}
免费观看{$arrVideo.v_name}
</p>
{elseif $variant == 16}
<div class="{$TpStyle.dom_prefix}-dm-desc v16">
<p>
<strong>{$arrVideo.v_name}</strong>
{$strDetailMainDescription|mb_substr=0,140}
</p>
</div>
{elseif $variant == 17}
<section class="{$TpStyle.dom_prefix}-dm-desc v17">
<p>{$strDetailMainDescription|mb_substr=0,180}</p>
</section>
{elseif $variant == 18}
<div class="{$TpStyle.dom_prefix}-dm-desc v18">
<p class="{$TpStyle.dom_prefix}-dm-desc-hidden">
{$strDetailMainDescription}
</p>
</div>
{elseif $variant == 19}
<article class="{$TpStyle.dom_prefix}-dm-desc v19">
<header>剧情简介</header>
<p>{$strDetailMainDescription|mb_substr=0,160}</p>
</article>
{/if}
{notempty name="$strDetailBody"}
<div class="{$TpStyle.dom_prefix}-dm-desc-body" style="margin-top:10px;padding:12px 12px;border:1px solid var(--border-color);border-radius:14px;background:var(--bg-soft-color);">
<p style="margin:0;color:var(--text-color);line-height:1.8;">{$strDetailBody}</p>
</div>
{/notempty}
{if empty($boolIsForgeDetail)}
{include file="module/seo_copy/detail" /}
{/if}
{if !empty($boolIsForgeDetail)}
<div class="{$TpStyle.dom_prefix}-dm-desc-guide" style="margin-top:10px;padding:12px 12px;border:1px solid var(--border-color);border-radius:14px;background:var(--bg-soft-color);">
<p style="margin:0;color:var(--text-color);line-height:1.8;">{$strForgeBodyLead|default='当前页围绕延伸词补充主片相关信息,适合先确认内容归属。'}</p>
<p style="margin:8px 0 0;color:var(--text-muted-color);line-height:1.7;">
{notempty name="$strMainVideoInfoUrl"}
{$strForgeReturnLead|default='如果想回到标准详情,可返回'} <a href="{$strMainVideoInfoUrl}">《{$strOriginVideoName}》详情页</a>
{/notempty}
{notempty name="$strPreferredPlayUrl"}
{$strForgePlayLead|default='如果准备继续观看,也可以直接进入'} <a href="{$strPreferredPlayUrl}">播放页</a>
{/notempty}
</p>
</div>
<div class="{$TpStyle.dom_prefix}-dm-forge-note" style="margin-top:10px;padding:12px 12px;border:1px solid var(--border-color);border-radius:14px;background:var(--bg-soft-color);">
<p style="margin:0;color:var(--text-color);line-height:1.8;">{$strForgeDetailNote|default='当前页提供的是延伸词视角,适合先确认内容归属,再决定是否回到标准详情或播放页。'}</p>
{notempty name="$strMainVideoInfoUrl"}
<p style="margin:8px 0 0;color:var(--text-muted-color);line-height:1.7;">如果你想继续查看主内容页,可以回到 <a href="{$strMainVideoInfoUrl}">《{$strOriginVideoName}》详情页</a></p>
{/notempty}
</div>
{/if}
{video:seoaddon video="$arrVideo" export_name="arrAddon" /}
{include file="module/detail/_seo_addon" /}