debug-video-seowords

This commit is contained in:
make
2025-05-27 15:26:44 +08:00
parent b392a65948
commit ef3eb4b1b4
8 changed files with 186 additions and 12 deletions

View File

@@ -78,6 +78,25 @@ class VideoService
return (string)$strUrl;
}
/**
* 伪造视频
*
* @param integer $intVId
* @param string $intPinYin
* @param integer $intVForgeId
* @return string
*/
public function getForgeVideoInfoUrl(int $intVId, string $intPinYin, int $intVForgeId): string
{
$strKey = 'FORGE_VIDEO_INFO_URL';
$strUrl = $this->SiteContext->DomainModel->getFomartUrl($strKey, [
'intVId' => $intVId,
'strPinYin' => $intPinYin,
'intVForgeId' => $intVForgeId,
]);
return (string)$strUrl;
}
/**
* 视频播放
*
@@ -678,9 +697,10 @@ class VideoService
* 根据VId获取视频详情
*
* @param integer $intVId
* @param integer|NULL $intVForgeId
* @return void
*/
public function getVideoByVId(int $intVId)
public function getVideoByVId(int $intVId, int|NULL $intVForgeId)
{
// 视频详情
@@ -690,6 +710,10 @@ class VideoService
throw new HttpException(404, '视频不存在');
}
if($intVForgeId >= 0 && !empty($arrVideo['v_seo_words'])){
$arrVideo['v_name'] = $arrVideo['v_seo_words'][$intVForgeId-1];
}
// 取前5个元素
$strTopActor = (is_array($arrVideo['v_actor'] ?? null)) ? array_slice($arrVideo['v_actor'], 0, 5) : '';