restore gpt seo copy pipeline and stabilize seo tkd output
This commit is contained in:
@@ -2,9 +2,9 @@
|
||||
{block name="get-data"}
|
||||
|
||||
{if $Request.route.intVId && $Request.route.intVForgeId}
|
||||
{video:info v_id="$Request.route.intVId" v_key="arrVideo" v_fid="$Request.route.intVForgeId" export_name="arrVideo"/}
|
||||
{elseif $Request.route.intVId}
|
||||
{video:info v_id="$Request.route.intVId" v_key="arrVideo" export_name="arrVideo"/}
|
||||
{video:info v_id="$Request.route.intVId" v_pinyin="$Request.route.strPinyin" v_key="arrVideo" v_fid="$Request.route.intVForgeId" export_name="arrVideo"/}
|
||||
{elseif $Request.route.intVId || $Request.route.strPinyin}
|
||||
{video:info v_id="$Request.route.intVId" v_pinyin="$Request.route.strPinyin" v_key="arrVideo" export_name="arrVideo"/}
|
||||
{else}
|
||||
{video:info v_id="$DomainModel->info_id" n_key="arrVideo" export_name="arrVideo" /}
|
||||
{/if}
|
||||
@@ -15,12 +15,83 @@
|
||||
area="all" lang="all" year="all" order="all" page="1"
|
||||
export_name="strVclurl" /}
|
||||
|
||||
{video:seocopy scene="play"
|
||||
video="$arrVideo"
|
||||
play_type="$Request.route.strPlayType"
|
||||
play_index="$Request.route.intPlayIndex"
|
||||
export_name="seoCopy" /}
|
||||
|
||||
{php}
|
||||
$arrBreadcrumb = [
|
||||
['title'=>'首页','url'=>'/'],
|
||||
['title'=>$arrVideo['v_parent_category'],'url'=>$strVciurl],
|
||||
['title'=>$arrVideo['v_category'],'url'=>$strVclurl],
|
||||
];
|
||||
|
||||
$strPlaySlug = trim((string)($arrVideo['v_name_en'] ?? request()->route('strPinyin') ?? ''));
|
||||
if ($strPlaySlug === '') {
|
||||
$strPlaySlug = (string)($arrVideo['v_id'] ?? '');
|
||||
}
|
||||
|
||||
$strCurrentPlayType = trim((string)(request()->route('strPlayType') ?? ''));
|
||||
$intCurrentPlayIndex = max(1, (int)(request()->route('intPlayIndex') ?? 1));
|
||||
$arrPlayGroups = is_array($arrVideo['v_play_url'] ?? null) ? $arrVideo['v_play_url'] : [];
|
||||
if ($strCurrentPlayType === '' && !empty($arrPlayGroups)) {
|
||||
$strCurrentPlayType = (string)array_key_first($arrPlayGroups);
|
||||
}
|
||||
|
||||
$strCurrentPlayLine = trim((string)app(\app\services\VideoService::class)->getConverterPlayLineVal($strCurrentPlayType));
|
||||
if ($strCurrentPlayLine === '') {
|
||||
$strCurrentPlayLine = strtoupper($strCurrentPlayType !== '' ? $strCurrentPlayType : 'default');
|
||||
}
|
||||
|
||||
$strCurrentEpisodeName = '第' . $intCurrentPlayIndex . '集';
|
||||
if (!empty($arrPlayGroups[$strCurrentPlayType][$intCurrentPlayIndex - 1]['name'])) {
|
||||
$strCurrentEpisodeName = trim((string)$arrPlayGroups[$strCurrentPlayType][$intCurrentPlayIndex - 1]['name']);
|
||||
}
|
||||
|
||||
$strPlayDetailUrl = '';
|
||||
if ((int)($arrVideo['v_id'] ?? 0) > 0) {
|
||||
$strPlayDetailUrl = app(\app\services\VideoService::class)->getVideoInfoUrl(
|
||||
(int)$arrVideo['v_id'],
|
||||
$strPlaySlug
|
||||
);
|
||||
}
|
||||
|
||||
$strPlayVisibleIntro = trim((string)($seoCopy['play_intro'] ?? ''));
|
||||
if ($strPlayVisibleIntro === '') {
|
||||
$strPlayVisibleIntro = '当前页围绕《' . (string)($arrVideo['v_name'] ?? '当前内容') . '》' . $strCurrentEpisodeName . '整理在线播放入口,并补充剧情与观看线索,方便直接续看。';
|
||||
}
|
||||
|
||||
$strPlayMetaNote = trim((string)($seoCopy['play_meta_note'] ?? ''));
|
||||
if ($strPlayMetaNote === '') {
|
||||
$strPlayMetaNote = '当前线路为' . $strCurrentPlayLine . ',如果加载较慢可以切换线路,或先回详情页补看剧情资料。';
|
||||
}
|
||||
|
||||
$strPlayBodyGuideLead = trim((string)($seoCopy['play_body_lead'] ?? ''));
|
||||
if ($strPlayBodyGuideLead === '') {
|
||||
$strPlayBodyGuideLead = '播放页更适合先确认当前线路、集数和回详情路径,再决定是否继续完整观看。';
|
||||
}
|
||||
|
||||
$strPlayBodyGuideNext = trim((string)($seoCopy['play_body_next'] ?? ''));
|
||||
if ($strPlayBodyGuideNext === '') {
|
||||
$strPlayBodyGuideNext = '如果想先了解完整剧情和人物资料,可以回到详情页继续浏览。';
|
||||
}
|
||||
|
||||
$arrPlayGuideCards = array_values(array_filter((array)($seoCopy['guide_cards'] ?? []), static function ($arrCard): bool {
|
||||
return is_array($arrCard)
|
||||
&& (
|
||||
trim((string)($arrCard['title'] ?? '')) !== ''
|
||||
|| trim((string)($arrCard['text'] ?? '')) !== ''
|
||||
);
|
||||
}));
|
||||
if (empty($arrPlayGuideCards)) {
|
||||
$arrPlayGuideCards = [
|
||||
['title' => '当前剧集', 'text' => $strCurrentEpisodeName],
|
||||
['title' => '当前线路', 'text' => $strCurrentPlayLine],
|
||||
['title' => '观看建议', 'text' => '如果当前线路不够稳定,可先切换线路,或返回详情页继续浏览剧情资料。'],
|
||||
];
|
||||
}
|
||||
{/php}
|
||||
{/block}
|
||||
|
||||
@@ -181,6 +252,8 @@
|
||||
|
||||
{include file="module/page/page_router" /}
|
||||
|
||||
{include file="module/seo_copy/play" /}
|
||||
|
||||
<script>
|
||||
const strMaxPlayHeight = '480px'
|
||||
const strVideoId = `{$arrVideo.v_id}`;
|
||||
|
||||
Reference in New Issue
Block a user