debug
This commit is contained in:
@@ -15,6 +15,7 @@ class Video extends TagLib
|
||||
'ranksort' => ['attr' => 'd_key,d_val'],
|
||||
'status' => ['attr' => 'd_key,d_val'],
|
||||
'category' => ['attr' => 'd_key,d_val,v_sex'],
|
||||
'categorytype' => ['attr' => 'category_type,d_key,d_val,v_sex'],
|
||||
|
||||
'ranklist' => ['attr' => 'count,sort_type,v_status,v_sex,diff_key,cache_life,d_key,d_val', 'close' => 1],
|
||||
];
|
||||
@@ -124,7 +125,7 @@ EOT;
|
||||
$v_category = $this->customBuildVar($v_category);
|
||||
$sort_type = $this->customBuildVar($sort_type);
|
||||
$v_status = $this->customBuildVar($v_status);
|
||||
|
||||
|
||||
$key = $this->customBuildVar($key);
|
||||
$diff_key = $this->customBuildVar($diff_key);
|
||||
$cache_life = $this->customBuildVar($cache_life);
|
||||
@@ -376,6 +377,42 @@ EOT;
|
||||
$strParse .= <<<EOT
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
EOT;
|
||||
return $strParse;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取状态筛选参数
|
||||
*
|
||||
* @param array $tag
|
||||
* @param string $content
|
||||
* @return string
|
||||
*/
|
||||
public function tagCategoryType($tag, $content)
|
||||
{
|
||||
|
||||
$d_key = $tag['d_key'] ?? 'd_key';
|
||||
$d_val = $tag['d_val'] ?? 'd_val';
|
||||
|
||||
$category_type = $tag['category_type'] ?? 'ONE';
|
||||
|
||||
$category_type = $this->customBuildVar($category_type);
|
||||
|
||||
$strParse = <<<EOT
|
||||
<?php
|
||||
\$arrCategoryType = \\app\\services\\StaticConfig::getVideoCategoryTypeFilter({$category_type});
|
||||
|
||||
if (!empty(\$arrCategoryType) && is_array(\$arrCategoryType)):
|
||||
|
||||
?>
|
||||
EOT;
|
||||
$strParse .= <<<EOT
|
||||
<?php foreach (\$arrCategoryType as \${$d_key} => \${$d_val}): ?>
|
||||
EOT;
|
||||
$strParse .= $content;
|
||||
$strParse .= <<<EOT
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
EOT;
|
||||
return $strParse;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user