This commit is contained in:
make
2025-05-12 20:21:39 +08:00
parent 8cd8d1542a
commit c593b8b5bf

View File

@@ -321,10 +321,29 @@ class SiteContext
*/
public function initVideoCategoryTypeTKD()
{
$strParentCategory = $this->Request->param('strParentCategory');
// 获取分类参数并进行安全处理
$strParentCategory = trim($this->Request->param('strParentCategory', ''));
// 初始化分类名称
$strVideoParentCategoryName = '';
// 检查分类是否有效
if (!empty($strParentCategory) && $strParentCategory !== 'all' && array_key_exists($strParentCategory, StaticConfig::$arrVideoClass)) {
$strVideoParentCategoryName = StaticConfig::$arrVideoClass[$strParentCategory];
}
// 设置分类名称
ConverterMovel::setVal([
'strVideoParentCategoryName' => empty($strParentCategory) || $strParentCategory == 'all' ? '' : StaticConfig::$arrVideoClass[$strParentCategory],
'strVideoParentCategoryName' => $strVideoParentCategoryName,
]);
// $strParentCategory = $this->Request->param('strParentCategory');
// if (array_key_exists($strParentCategory, StaticConfig::$arrVideoClass)) {
// }
// ConverterMovel::setVal([
// 'strVideoParentCategoryName' => empty($strParentCategory) || $strParentCategory == 'all' ? '' : StaticConfig::$arrVideoClass[$strParentCategory],
// ]);
}
/**