gpttemp
This commit is contained in:
@@ -20,13 +20,13 @@ class Site extends TagLib
|
||||
'grm' => ['attr' => 'domain,code,line,diff,start,end,index,type', 'close' => 0],
|
||||
'replace' => ['attr' => 'code,diff', 'close' => 0],
|
||||
|
||||
'vciurl' => ['attr' => 'parent_category', 'close' => 0],
|
||||
'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],
|
||||
'vciurl' => ['attr' => 'parent_category,export_name', 'close' => 0],
|
||||
'vclurl' => ['attr' => 'category,parent_category,area,lang,year,order,page,export_name', 'close' => 0],
|
||||
'vrlurl' => ['attr' => 'category,parent_category,sort_type,page,export_name', 'close' => 0],
|
||||
'vurl' => ['attr' => 'v_id,v_py,export_name', 'close' => 0],
|
||||
'vfurl' => ['attr' => 'v_id,v_py,v_fid,export_name', 'close' => 0],
|
||||
'vpurl' => ['attr' => 'v_id,v_py,play_type,play_index,export_name', 'close' => 0],
|
||||
'vsurl' => ['attr' => 'key,export_name', 'close' => 0],
|
||||
|
||||
'forgelist' => ['attr' => 'count,diff_key,cache_life,d_key,d_val', 'close' => 1],
|
||||
'helper' => ['attr' => 'func', 'close' => 0],
|
||||
@@ -52,13 +52,33 @@ class Site extends TagLib
|
||||
{
|
||||
$strParentCategory = $tag['parent_category'];
|
||||
$strParentCategory = $this->customBuildVar($strParentCategory);
|
||||
$export_name = $tag['export_name'] ?? '';
|
||||
// 随机别名变量,避免与模板内其它变量冲突
|
||||
$strDataName = randomString(8);
|
||||
|
||||
// export_name 做基本校验(可选但建议)
|
||||
if (!empty($export_name) && !preg_match('/^[A-Za-z_]\w*$/', $export_name)) {
|
||||
$export_name = '';
|
||||
}
|
||||
|
||||
// 先统一计算 URL
|
||||
$strParse = <<<EOD
|
||||
<?php
|
||||
\$strUrl = app(\\app\\services\\VideoService::class)->getVideoCategoryIndexUrl({$strParentCategory});
|
||||
echo \$strUrl;
|
||||
\${$strDataName} = app(\\app\\services\\VideoService::class)->getVideoCategoryIndexUrl({$strParentCategory});
|
||||
EOD;
|
||||
|
||||
// 决定导出还是直接输出
|
||||
if (empty($export_name)) {
|
||||
$strParse .= <<<EOD
|
||||
echo \${$strDataName};
|
||||
?>
|
||||
EOD;
|
||||
} else {
|
||||
$strParse .= <<<EOD
|
||||
\${$export_name} = \${$strDataName};
|
||||
?>
|
||||
EOD;
|
||||
}
|
||||
return $strParse;
|
||||
}
|
||||
|
||||
@@ -77,6 +97,7 @@ EOD;
|
||||
$strYear = isset($tag['year']) ? $tag['year'] : 'all';
|
||||
$strOrder = isset($tag['order']) ? $tag['order'] : '';
|
||||
$intPage = isset($tag['page']) ? $tag['page'] : 1;
|
||||
$export_name = $tag['export_name'] ?? '';
|
||||
|
||||
$strCategory = $this->customBuildVar($strCategory);
|
||||
$strParentCategory = $this->customBuildVar($strParentCategory);
|
||||
@@ -86,12 +107,31 @@ EOD;
|
||||
$strOrder = $this->customBuildVar($strOrder);
|
||||
$intPage = $this->customBuildVar($intPage);
|
||||
|
||||
// 随机别名变量,避免与模板内其它变量冲突
|
||||
$strDataName = randomString(8);
|
||||
|
||||
// export_name 做基本校验(可选但建议)
|
||||
if (!empty($export_name) && !preg_match('/^[A-Za-z_]\w*$/', $export_name)) {
|
||||
$export_name = '';
|
||||
}
|
||||
|
||||
$strParse = <<<EOD
|
||||
<?php
|
||||
\$strUrl = app(\\app\\services\\VideoService::class)->getVideoCategoryUrl({$strCategory},{$strParentCategory},{$strArea},{$strLang},{$strYear},{$strOrder},{$intPage});
|
||||
echo \$strUrl;
|
||||
\${$strDataName} = app(\\app\\services\\VideoService::class)->getVideoCategoryUrl({$strCategory},{$strParentCategory},{$strArea},{$strLang},{$strYear},{$strOrder},{$intPage});
|
||||
|
||||
EOD;
|
||||
// 决定导出还是直接输出
|
||||
if (empty($export_name)) {
|
||||
$strParse .= <<<EOD
|
||||
echo \${$strDataName};
|
||||
?>
|
||||
EOD;
|
||||
} else {
|
||||
$strParse .= <<<EOD
|
||||
\${$export_name} = \${$strDataName};
|
||||
?>
|
||||
EOD;
|
||||
}
|
||||
return $strParse;
|
||||
}
|
||||
|
||||
@@ -112,12 +152,30 @@ EOD;
|
||||
$strSortType = $this->customBuildVar($strSortType);
|
||||
$intPage = $this->customBuildVar($intPage);
|
||||
|
||||
$export_name = $tag['export_name'] ?? '';
|
||||
$strDataName = randomString(8);
|
||||
|
||||
// export_name 做基本校验(可选但建议)
|
||||
if (!empty($export_name) && !preg_match('/^[A-Za-z_]\w*$/', $export_name)) {
|
||||
$export_name = '';
|
||||
}
|
||||
|
||||
$strParse = <<<EOD
|
||||
<?php
|
||||
\$strUrl = app(\\app\\services\\VideoService::class)->getVideoRankUrl({$strCategory},{$strParentCategory},{$strSortType},{$intPage});
|
||||
echo \$strUrl;
|
||||
\${$strDataName} = app(\\app\\services\\VideoService::class)->getVideoRankUrl({$strCategory},{$strParentCategory},{$strSortType},{$intPage});
|
||||
EOD;
|
||||
// 决定导出还是直接输出
|
||||
if (empty($export_name)) {
|
||||
$strParse .= <<<EOD
|
||||
echo \${$strDataName};
|
||||
?>
|
||||
EOD;
|
||||
} else {
|
||||
$strParse .= <<<EOD
|
||||
\${$export_name} = \${$strDataName};
|
||||
?>
|
||||
EOD;
|
||||
}
|
||||
return $strParse;
|
||||
}
|
||||
|
||||
@@ -135,12 +193,30 @@ EOD;
|
||||
$intVId = $this->customBuildVar($intVId);
|
||||
$strVPy = $this->customBuildVar($strVPy);
|
||||
|
||||
$export_name = $tag['export_name'] ?? '';
|
||||
$strDataName = randomString(8);
|
||||
|
||||
// export_name 做基本校验(可选但建议)
|
||||
if (!empty($export_name) && !preg_match('/^[A-Za-z_]\w*$/', $export_name)) {
|
||||
$export_name = '';
|
||||
}
|
||||
|
||||
$strParse = <<<EOD
|
||||
<?php
|
||||
\$strUrl = app(\\app\\services\\VideoService::class)->getVideoInfoUrl({$intVId},{$strVPy});
|
||||
echo \$strUrl;
|
||||
\${$strDataName} = app(\\app\\services\\VideoService::class)->getVideoInfoUrl({$intVId},{$strVPy});
|
||||
EOD;
|
||||
// 决定导出还是直接输出
|
||||
if (empty($export_name)) {
|
||||
$strParse .= <<<EOD
|
||||
echo \${$strDataName};
|
||||
?>
|
||||
EOD;
|
||||
} else {
|
||||
$strParse .= <<<EOD
|
||||
\${$export_name} = \${$strDataName};
|
||||
?>
|
||||
EOD;
|
||||
}
|
||||
return $strParse;
|
||||
}
|
||||
|
||||
@@ -160,12 +236,30 @@ EOD;
|
||||
$strVPy = $this->customBuildVar($strVPy);
|
||||
$intVForgeId = $this->customBuildVar($intVForgeId);
|
||||
|
||||
$export_name = $tag['export_name'] ?? '';
|
||||
$strDataName = randomString(8);
|
||||
|
||||
// export_name 做基本校验(可选但建议)
|
||||
if (!empty($export_name) && !preg_match('/^[A-Za-z_]\w*$/', $export_name)) {
|
||||
$export_name = '';
|
||||
}
|
||||
|
||||
$strParse = <<<EOD
|
||||
<?php
|
||||
\$strUrl = app(\\app\\services\\VideoService::class)->getForgeVideoInfoUrl({$intVId},{$strVPy},{$intVForgeId});
|
||||
echo \$strUrl;
|
||||
\${$strDataName} = app(\\app\\services\\VideoService::class)->getForgeVideoInfoUrl({$intVId},{$strVPy},{$intVForgeId});
|
||||
EOD;
|
||||
// 决定导出还是直接输出
|
||||
if (empty($export_name)) {
|
||||
$strParse .= <<<EOD
|
||||
echo \${$strDataName};
|
||||
?>
|
||||
EOD;
|
||||
} else {
|
||||
$strParse .= <<<EOD
|
||||
\${$export_name} = \${$strDataName};
|
||||
?>
|
||||
EOD;
|
||||
}
|
||||
return $strParse;
|
||||
}
|
||||
|
||||
@@ -188,12 +282,30 @@ EOD;
|
||||
$strPlayType = $this->customBuildVar($strPlayType);
|
||||
$intPlayIndex = $this->customBuildVar($intPlayIndex);
|
||||
|
||||
$export_name = $tag['export_name'] ?? '';
|
||||
$strDataName = randomString(8);
|
||||
|
||||
// export_name 做基本校验(可选但建议)
|
||||
if (!empty($export_name) && !preg_match('/^[A-Za-z_]\w*$/', $export_name)) {
|
||||
$export_name = '';
|
||||
}
|
||||
|
||||
$strParse = <<<EOD
|
||||
<?php
|
||||
\$strUrl = app(\\app\\services\\VideoService::class)->getVideoPlayUrl({$intVId},{$strVPy},{$strPlayType},{$intPlayIndex});
|
||||
echo \$strUrl;
|
||||
\${$strDataName} = app(\\app\\services\\VideoService::class)->getVideoPlayUrl({$intVId},{$strVPy},{$strPlayType},{$intPlayIndex});
|
||||
EOD;
|
||||
// 决定导出还是直接输出
|
||||
if (empty($export_name)) {
|
||||
$strParse .= <<<EOD
|
||||
echo \${$strDataName};
|
||||
?>
|
||||
EOD;
|
||||
} else {
|
||||
$strParse .= <<<EOD
|
||||
\${$export_name} = \${$strDataName};
|
||||
?>
|
||||
EOD;
|
||||
}
|
||||
return $strParse;
|
||||
}
|
||||
|
||||
@@ -211,12 +323,30 @@ EOD;
|
||||
$strKey = $this->customBuildVar($strKey);
|
||||
$intPage = $this->customBuildVar($intPage);
|
||||
|
||||
$export_name = $tag['export_name'] ?? '';
|
||||
$strDataName = randomString(8);
|
||||
|
||||
// export_name 做基本校验(可选但建议)
|
||||
if (!empty($export_name) && !preg_match('/^[A-Za-z_]\w*$/', $export_name)) {
|
||||
$export_name = '';
|
||||
}
|
||||
|
||||
$strParse = <<<EOD
|
||||
<?php
|
||||
\$strUrl = app(\\app\\services\\VideoService::class)->getVideoSearchUrl({$strKey},{$intPage});
|
||||
echo \$strUrl;
|
||||
\${$strDataName} = app(\\app\\services\\VideoService::class)->getVideoSearchUrl({$strKey},{$intPage});
|
||||
EOD;
|
||||
// 决定导出还是直接输出
|
||||
if (empty($export_name)) {
|
||||
$strParse .= <<<EOD
|
||||
echo \${$strDataName};
|
||||
?>
|
||||
EOD;
|
||||
} else {
|
||||
$strParse .= <<<EOD
|
||||
\${$export_name} = \${$strDataName};
|
||||
?>
|
||||
EOD;
|
||||
}
|
||||
return $strParse;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user