This commit is contained in:
make
2025-04-20 16:55:49 +08:00
parent 34f56d46d4
commit d1b6e5100e
13 changed files with 148 additions and 43 deletions

View File

@@ -286,6 +286,7 @@ EOD;
*/
public function tagGrm($tag)
{
$page_code = $tag['page_code'] ?? '';
$diff = $tag['diff'] ?? '';
$num = $tag['num'] ?? 1;
@@ -294,16 +295,21 @@ EOD;
$page_code = $this->customBuildVar($page_code);
$diff = $this->customBuildVar($diff);
$num = $this->customBuildVar($num);
// var_dump($page_code);
// var_dump($diff);
// var_dump($num);
// exit;
$arrDataName = randomString(5);
$strParse = <<<EOT
<?php
\$arrChapter = app(\\app\\services\\SiteContext::class)->generateGrm(
\${$arrDataName} = app(\\app\\services\\SiteContext::class)->generateGrm(
{$page_code},
{$diff},
{$num}
);
\${$g_key} = \$arrChapter ?? [];
\${$g_key} = \${$arrDataName} ?? [];
?>
EOT;