diff --git a/apps/home/controller/TagController.php b/apps/home/controller/TagController.php index 84db4df..4bd2c0c 100644 --- a/apps/home/controller/TagController.php +++ b/apps/home/controller/TagController.php @@ -29,10 +29,11 @@ public function index() { // 在非兼容模式接受地址第二参数值 if (defined('RVAR')) { - $_GET['tag'] = RVAR; + $_GET['tag'] = constant('\RVAR'); } - if (! get('tag')) { + $tag = get('tag', 'vars'); + if (! $tag) { _404('您访问的页面不存在,请核对后重试!'); } @@ -42,9 +43,9 @@ public function index() } $content = parent::parser($this->htmldir . $tagstpl); // 框架标签解析 $content = $this->parser->parserBefore($content); // CMS公共标签前置解析 - $content = $this->parser->parserPositionLabel($content, 0, '相关内容', Url::home('tag/' . get('tag'))); // CMS当前位置标签解析 - $content = $this->parser->parserSpecialPageSortLabel($content, - 2, '相关内容', Url::home('tag/' . get('tag'))); // 解析分类标签 + $content = $this->parser->parserPositionLabel($content, 0, '相关内容', Url::home('tag/' . $tag)); // CMS当前位置标签解析 + $content = $this->parser->parserSpecialPageSortLabel($content, - 2, '相关内容', Url::home('tag/' . $tag)); // 解析分类标签 $content = $this->parser->parserAfter($content); // CMS公共标签后置解析 $this->cache($content, true); } -} \ No newline at end of file +}