This commit is contained in:
make
2025-04-21 23:45:10 +08:00
parent f21ece4de1
commit 683424b63e
19 changed files with 231 additions and 96 deletions

View File

@@ -21,6 +21,7 @@ class Site extends TagLib
'forgelist' => ['attr' => 'count,diff_key,cache_life,d_key,d_val', 'close' => 1],
'helper' => ['attr' => 'func', 'close' => 0],
'getval' => ['attr' => 'code', 'close' => 0],
];
private function customBuildVar($mixedArgs)
@@ -33,9 +34,32 @@ class Site extends TagLib
}
/**
* 小说详情URL生成器
* 内容替换
*
* @param array $n_id
* @param array
* @return string
*/
public function tagGetVal($tag)
{
$strCode = $tag['code'];
if (empty($strCode)) {
return ''; // 或返回默认值
}
$strParse = <<<EOD
<?php
\$strUrl = app(\\app\\services\\SiteContext::class)->getConverterVal("{$strCode}");
echo \$strUrl;
?>
EOD;
return $strParse;
}
/**
* 视图反向控制器(注释函数)
*
* @param array $func
* @return string
*/
public function tagHelper($tag)