From f6e74cc7b72fac555226c3a49409bb938c88137f Mon Sep 17 00:00:00 2001 From: Anyon Date: Fri, 12 May 2017 17:26:55 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=9B=B4=E6=96=B0]=E4=BF=AE=E6=94=B9=E5=BE=AE?= =?UTF-8?q?=E4=BF=A1=E6=89=8B=E6=9C=BA=E9=A2=84=E8=A7=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/wechat/controller/Review.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/application/wechat/controller/Review.php b/application/wechat/controller/Review.php index b4511a24f..e0714ce7f 100644 --- a/application/wechat/controller/Review.php +++ b/application/wechat/controller/Review.php @@ -27,11 +27,8 @@ class Review extends Controller { */ public function index() { $get = $this->request->get(); - // 内容 - $content = $this->request->get('content', ''); - $this->assign('content', str_replace("\n", '
', $content)); - // 类型 - $type = $this->request->get('type', 'text'); + $content = str_replace("\n", "
", $this->request->get('content', '')); // 内容 + $type = $this->request->get('type', 'text'); // 类型 $this->assign('type', $type); // 图文处理 if ($type === 'news' && is_numeric($content) && !empty($content)) { @@ -44,6 +41,7 @@ class Review extends Controller { $this->assign('vo', $article); } $this->assign($get); + $this->assign('content', $content); // 渲染模板并显示 return view(); }