diff --git a/code/app/home/config/router.php b/code/app/home/config/router.php
index db96dd9..8a5d53b 100644
--- a/code/app/home/config/router.php
+++ b/code/app/home/config/router.php
@@ -281,6 +281,25 @@ $arrRoutes = [
],
+ /**
+ * 视频详情-伪造
+ * /voddetail/strVideoPinyin-1-1
+ */
+ 'video_info_forge' => [
+ '/voddetail/:strPinyin-:intVId-:intVForgeId',
+ '/vodinfo/:strPinyin-:intVId-:intVForgeId',
+ '/vod/:strPinyin-:intVId-:intVForgeId',
+
+ '/video-info/:strPinyin-:intVId-:intVForgeId',
+ '/video-detail/:strPinyin-:intVId-:intVForgeId',
+ '/video/:strPinyin-:intVId-:intVForgeId',
+
+ '/shipin/:strPinyin-:intVId-:intVForgeId',
+ '/shipin-xiangqing/:strPinyin-:intVId-:intVForgeId',
+ '/shipin-neiron/:strPinyin-:intVId-:intVForgeId',
+
+ ],
+
/**
* 视频详情
* /voddetail/strVideoPinyin-1
@@ -440,6 +459,19 @@ foreach ($arrRoutes['prefixes'] as $platform => $prefixes) {
'intPage' => '\d*', // 允许空值
]);
break;
+
+ case 'video_info_forge':
+ //详情
+ $strView = 'pc/getVideoInfo.html';
+ if ($platform == 'h5') {
+ $strView = 'video/getVideoInfo.html';
+ }
+ Route::get($strRoute, function () use ($strView) {
+ return view($strView);
+ })
+ ->pattern(['intVId' => '\d+', 'strPinyin' => '[\w-]+','intVForgeId' => '\d+']);
+
+ break;
case 'video_info':
//详情
$strView = 'pc/getVideoInfo.html';
diff --git a/code/app/home/view/videoDadi/video/getVideoInfo.html b/code/app/home/view/videoDadi/video/getVideoInfo.html
index 04810a0..a31b95e 100644
--- a/code/app/home/view/videoDadi/video/getVideoInfo.html
+++ b/code/app/home/view/videoDadi/video/getVideoInfo.html
@@ -2,11 +2,14 @@
{block name="get-data"}
-{if $Request.route.intVId}
+{if $Request.route.intVId && $Request.route.intVForgeId}
+ {video:info v_id="$Request.route.intVId" v_key="arrVideo" v_fid="$Request.route.intVForgeId" /}
+{elseif $Request.route.intVId}
{video:info v_id="$Request.route.intVId" v_key="arrVideo" /}
{else}
- {video:info v_id="$DomainModel->info_id" n_key="arrVideo" n_forge_id="0" /}
+ {video:info v_id="$DomainModel->info_id" n_key="arrVideo" /}
{/if}
+
{site:grm page_code="h5_video_info" diff="$arrVideo.v_id" num="120" g_key="arrGrm" /}
{/block}
@@ -132,6 +135,8 @@
{/block}
{block name="main"}
+
+
diff --git a/code/app/services/VideoService.php b/code/app/services/VideoService.php
index a701ca5..cecbf2b 100644
--- a/code/app/services/VideoService.php
+++ b/code/app/services/VideoService.php
@@ -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) : '';
diff --git a/code/app/task/logic/VideoSeoLogic.php b/code/app/task/logic/VideoSeoLogic.php
index 55d0114..30c8083 100644
--- a/code/app/task/logic/VideoSeoLogic.php
+++ b/code/app/task/logic/VideoSeoLogic.php
@@ -70,7 +70,7 @@ class VideoSeoLogic
{
try {
- $strUrl = 'https://suggestion.baidu.com/su?wd=%s&json=1&p=3&cb=callback';
+ $strUrl = 'https://suggestion.baidu.com/su?wd=%s&json=1&p=1&cb=callback';
$strUrl = sprintf($strUrl, $strVName);
diff --git a/code/extend/template/taglib/Site.php b/code/extend/template/taglib/Site.php
index 9587b98..7307c32 100644
--- a/code/extend/template/taglib/Site.php
+++ b/code/extend/template/taglib/Site.php
@@ -24,6 +24,7 @@ class Site extends TagLib
'vclurl' => ['attr' => 'category,parent_category,area,lang,year,order,page', 'close' => 0],
'vrlurl' => ['attr' => 'category,parent_category,sort_type,page', 'close' => 0],
'vurl' => ['attr' => 'v_id,v_py', 'close' => 0],
+ 'vfurl' => ['attr' => 'v_id,v_py,v_fid', 'close' => 0],
'vpurl' => ['attr' => 'v_id,v_py,play_type,play_index', 'close' => 0],
'vsurl' => ['attr' => 'key', 'close' => 0],
@@ -143,6 +144,32 @@ EOD;
return $strParse;
}
+ /**
+ * 伪视频详情URL生成器
+ *
+ * @param array $n_id
+ * @return string
+ */
+ public function tagVFUrl($tag)
+ {
+ $intVId = isset($tag['v_id']) ? $tag['v_id'] : '';
+ $strVPy = isset($tag['v_py']) ? $tag['v_py'] : '';
+ $intVForgeId = isset($tag['v_fid']) ? $tag['v_fid'] : '';
+
+ $intVId = $this->customBuildVar($intVId);
+ $strVPy = $this->customBuildVar($strVPy);
+ $intVForgeId = $this->customBuildVar($intVForgeId);
+
+ $strParse = <<getForgeVideoInfoUrl({$intVId},{$strVPy},{$intVForgeId});
+ echo \$strUrl;
+?>
+EOD;
+ return $strParse;
+ }
+
+
/**
* 视频播放URL生成器
*
diff --git a/code/extend/template/taglib/Video.php b/code/extend/template/taglib/Video.php
index 008513c..49a9b54 100644
--- a/code/extend/template/taglib/Video.php
+++ b/code/extend/template/taglib/Video.php
@@ -337,16 +337,20 @@ EOT;
{
$v_id = $tag['v_id'] ?? '0';
+ $v_fid = $tag['v_fid'] ?? -1;
+
$v_key = $tag['v_key'] ?? 'arrVideo';
$v_id = $this->customBuildVar($v_id);
+ $v_fid = $this->customBuildVar($v_fid);
$arrDataName = randomString(5);
$strParse = <<getVideoByVId(
- {$v_id}
+ {$v_id},
+ {$v_fid}
);
\${$v_key} = \${$arrDataName} ?? [];
diff --git a/code/public/initdata/video/baseSubjectFomartGroup.php b/code/public/initdata/video/baseSubjectFomartGroup.php
index 4f17617..03ceb1c 100644
--- a/code/public/initdata/video/baseSubjectFomartGroup.php
+++ b/code/public/initdata/video/baseSubjectFomartGroup.php
@@ -361,7 +361,15 @@ $arrVideoSubjectFomartGroupData = [
'arrSubjectFomart' => ['/pc']
],
- // 最新替换模板分组id 1122
+ 'FORGE_VIDEO_INFO_URL' => [
+ 'description' => '伪视频详情URL 模板1',
+ 'sfg_id' => 1123,
+ 'arrSubjectFomart' => [
+ '/voddetail/{strPinYin}-{intVId}-{intVForgeId}',
+ ]
+ ],
+
+ // 最新替换模板分组id 1131
];
diff --git a/code/public/initdata/video/urlSubjectFomartGroup.php b/code/public/initdata/video/urlSubjectFomartGroup.php
index 352d09e..f8cb7eb 100644
--- a/code/public/initdata/video/urlSubjectFomartGroup.php
+++ b/code/public/initdata/video/urlSubjectFomartGroup.php
@@ -539,12 +539,64 @@ return [
'/windows',
]
],
-
-
-
-
+ 'FORGE_VIDEO_INFO_URL_T2' => [
+ 'description' => '伪视频详情URL 模板2',
+ 'sfg_id' => 1124,
+ 'arrSubjectFomart' => [
+ '/vodinfo/{strPinYin}-{intVId}-{intVForgeId}',
+ ]
+ ],
+ 'FORGE_VIDEO_INFO_URL_T3' => [
+ 'description' => '伪视频详情URL 模板3',
+ 'sfg_id' => 1125,
+ 'arrSubjectFomart' => [
+ '/vod/{strPinYin}-{intVId}-{intVForgeId}',
+ ]
+ ],
+ 'FORGE_VIDEO_INFO_URL_T4' => [
+ 'description' => '伪视频详情URL 模板4',
+ 'sfg_id' => 1126,
+ 'arrSubjectFomart' => [
+ '/video-info/{strPinYin}-{intVId}-{intVForgeId}',
+ ]
+ ],
+ 'FORGE_VIDEO_INFO_URL_T5' => [
+ 'description' => '伪视频详情URL 模板5',
+ 'sfg_id' => 1127,
+ 'arrSubjectFomart' => [
+ '/video-detail/{strPinYin}-{intVId}-{intVForgeId}',
+ ]
+ ],
+ 'FORGE_VIDEO_INFO_URL_T6' => [
+ 'description' => '伪视频详情URL 模板6',
+ 'sfg_id' => 1128,
+ 'arrSubjectFomart' => [
+ '/video/{strPinYin}-{intVId}-{intVForgeId}',
+ ]
+ ],
+ 'FORGE_VIDEO_INFO_URL_T7' => [
+ 'description' => '伪视频详情URL 模板7',
+ 'sfg_id' => 1129,
+ 'arrSubjectFomart' => [
+ '/shipin/{strPinYin}-{intVId}-{intVForgeId}',
+ ]
+ ],
+ 'FORGE_VIDEO_INFO_URL_T8' => [
+ 'description' => '伪视频详情URL 模板8',
+ 'sfg_id' => 1130,
+ 'arrSubjectFomart' => [
+ '/shipin-xiangqing/{strPinYin}-{intVId}-{intVForgeId}',
+ ]
+ ],
+ 'FORGE_VIDEO_INFO_URL_T9' => [
+ 'description' => '伪视频详情URL 模板9',
+ 'sfg_id' => 1131,
+ 'arrSubjectFomart' => [
+ '/shipin-neiron/{strPinYin}-{intVId}-{intVForgeId}',
+ ]
+ ],
- // 最新替换模板分组id 1122
+ // 最新替换模板分组id 1131
];