diff --git a/library/think/View.php b/library/think/View.php index cff28228..6bc08d20 100644 --- a/library/think/View.php +++ b/library/think/View.php @@ -169,7 +169,7 @@ class View public function fetch($template = '', $vars = [], $config = [], $renderContent = false) { // 模板变量 - $vars = $vars ? $vars : $this->data; + $vars = array_merge($this->data, $vars); if (!$renderContent) { // 获取模板文件名 $template = $this->parseTemplate($template); diff --git a/tpl/think_exception.tpl b/tpl/think_exception.tpl index df1eb395..6c719fd8 100644 --- a/tpl/think_exception.tpl +++ b/tpl/think_exception.tpl @@ -13,7 +13,7 @@ padding: 20px; } h1{ - margin: 0; + margin: 10px 0 0; font-size: 28px; font-weight: 500; line-height: 32px; @@ -22,7 +22,7 @@ color: #4288ce; font-weight: 400; padding: 6px 0; - margin: 10px 6px 0 0; + margin: 6px 0 0; font-size: 18px; border-bottom: 1px solid #eee; }