Merge branch 'dev' of ssh://git.bgbg.live:18150/root/SEONexus into dev

This commit is contained in:
Default
2025-04-22 22:10:55 +08:00
19 changed files with 781 additions and 473 deletions

View File

@@ -12,6 +12,7 @@ class Novel extends TagLib
'pagerexp' => ['attr' => 'page,limit,n_category,sort_type,n_status,n_sex,key,diff_key,cache_life,d_key,d_val,p_val,func,export_name', 'close' => 0],
'info' => ['attr' => 'n_id,n_forge_id,n_key', 'close' => 0],
'sort' => ['attr' => 'd_key,d_val'],
'ranksort' => ['attr' => 'd_key,d_val'],
'status' => ['attr' => 'd_key,d_val'],
'sex' => ['attr' => 'd_key,d_val'],
'category' => ['attr' => 'd_key,d_val,n_sex'],
@@ -281,7 +282,39 @@ EOT;
$strParse = <<<EOT
<?php
\$arrSort = app(\\app\\services\\NovelService::class)->arrSortType;
\$arrSort = app(\\app\\services\\StaticConfig::class)::\$arrNovelSortType;
if (!empty(\$arrSort) && is_array(\$arrSort)):
?>
EOT;
$strParse .= <<<EOT
<?php foreach (\$arrSort as \${$d_key} => \${$d_val}): ?>
EOT;
$strParse .= $content;
$strParse .= <<<EOT
<?php endforeach; ?>
<?php endif; ?>
EOT;
return $strParse;
}
/**
* 获取排序筛选参数
*
* @param array $tag
* @param string $content
* @return string
*/
public function tagRankSort($tag, $content)
{
$d_key = $tag['d_key'] ?? 'd_key';
$d_val = $tag['d_val'] ?? 'd_val';
$strParse = <<<EOT
<?php
\$arrSort = app(\\app\\services\\StaticConfig::class)::\$arrNovelRankSortType;
if (!empty(\$arrSort) && is_array(\$arrSort)):
@@ -313,7 +346,7 @@ EOT;
$strParse = <<<EOT
<?php
\$arrStatus = app(\\app\\services\\NovelService::class)->arrStatus;
\$arrStatus = app(\\app\\services\\StaticConfig::class)::\$arrNovelStatus;
if (!empty(\$arrStatus) && is_array(\$arrStatus)):
@@ -346,7 +379,7 @@ EOT;
$strParse = <<<EOT
<?php
\$arrSex = app(\\app\\services\\NovelService::class)->arrSex;
\$arrSex = app(\\app\\services\\StaticConfig::class)::\$arrNovelSex;
if (!empty(\$arrSex) && is_array(\$arrSex)):