diff --git a/application/extra/site.php b/application/extra/site.php index 9f282bbb..9d7b3cf1 100644 --- a/application/extra/site.php +++ b/application/extra/site.php @@ -12,6 +12,7 @@ return [ 'frontend' => 'zh-cn', ], 'fixedpage' => 'dashboard', + 'agreement' => '协议内容', 'categorytype' => [ 'default' => 'Default', 'page' => 'Page', diff --git a/application/index/controller/User.php b/application/index/controller/User.php index a12ee7e6..aef223f9 100644 --- a/application/index/controller/User.php +++ b/application/index/controller/User.php @@ -400,6 +400,7 @@ class User extends Frontend public function agreement() { $this->view->assign('title', __('User agreement')); + $this->view->assign('content', xss_clean(config('site.agreement'))); return $this->view->fetch(); } } diff --git a/application/index/view/user/agreement.html b/application/index/view/user/agreement.html index 0f944ea2..1484e03d 100644 --- a/application/index/view/user/agreement.html +++ b/application/index/view/user/agreement.html @@ -1,7 +1,8 @@
用户协议内容
+{:$content}
+