From e7e11bf83c1d1ab4a9cb6df106dda8645d621eea Mon Sep 17 00:00:00 2001 From: Seven Du Date: Fri, 7 Dec 2018 15:14:49 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=A0=B8=E5=BF=83):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=20TS+=20=E7=94=A8=E6=88=B7=E6=B3=A8=E5=86=8C=E5=8D=8F=E8=AE=AE?= =?UTF-8?q?=E6=9C=AA=E4=BD=BF=E7=94=A8=E6=9C=80=E6=96=B0=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=20Bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #489 --- app/Http/Controllers/APIs/V2/SystemController.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/APIs/V2/SystemController.php b/app/Http/Controllers/APIs/V2/SystemController.php index b958bf32e..7b08d34ec 100644 --- a/app/Http/Controllers/APIs/V2/SystemController.php +++ b/app/Http/Controllers/APIs/V2/SystemController.php @@ -22,6 +22,8 @@ use Carbon\Carbon; use Illuminate\Http\Request; +use Zhiyi\Plus\Utils\Markdown; +use function Zhiyi\Plus\setting; use Zhiyi\Plus\Models\Conversation; class SystemController extends Controller @@ -71,9 +73,12 @@ public function about() * @author Foreach<791477842@qq.com> * @return html */ - public function agreement() + public function agreement(Markdown $markdown) { - $content = \Parsedown::instance()->setMarkupEscaped(true)->text(config('registerSettings.content', '')); + $content = setting('user', 'register-setting', [ + 'content' => '# 服务条款及隐私政策', + ])['content'] ?? '# 服务条款及隐私政策'; + $content = $markdown->toHtml($content); return view('agreement', ['content' => $content]); }