From 0d7ad4e712dda80ece9c1d80e57c7c3151a7a4d6 Mon Sep 17 00:00:00 2001
From: gongfuxiang <2499232802@qq.com>
Date: Sun, 7 Apr 2019 22:27:39 +0800
Subject: [PATCH] =?UTF-8?q?=E9=97=AE=E7=AD=94=E5=AD=97=E8=8A=82=E4=BC=98?=
=?UTF-8?q?=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
application/admin/controller/Answer.php | 13 ++++++++++
.../admin/view/default/answer/index.html | 16 ++++++++----
.../admin/view/default/answer/save_info.html | 4 +--
.../plugins/view/answers/index/detail.html | 4 +--
.../plugins/view/answers/index/popup.html | 2 +-
application/service/AnswerService.php | 26 ++++++++++++++++---
public/static/admin/default/css/answer.css | 2 +-
7 files changed, 52 insertions(+), 15 deletions(-)
diff --git a/application/admin/controller/Answer.php b/application/admin/controller/Answer.php
index 20b8fb931..0621a18d2 100755
--- a/application/admin/controller/Answer.php
+++ b/application/admin/controller/Answer.php
@@ -116,6 +116,19 @@ class Answer extends Common
'field' => '*',
);
$ret = AnswerService::AnswerList($data_params);
+
+ // 内容
+ if(!empty($ret['data'][0]['content']))
+ {
+ $ret['data'][0]['content'] = str_replace('
', "\n", $ret['data'][0]['content']);
+ }
+
+ // 回复内容
+ if(!empty($ret['data'][0]['reply']))
+ {
+ $ret['data'][0]['reply'] = str_replace('
', "\n", $ret['data'][0]['reply']);
+ }
+
$data = empty($ret['data'][0]) ? [] : $ret['data'][0];
}
$this->assign('data', $data);
diff --git a/application/admin/view/default/answer/index.html b/application/admin/view/default/answer/index.html
index 62ba7ee89..1a16f78ef 100755
--- a/application/admin/view/default/answer/index.html
+++ b/application/admin/view/default/answer/index.html
@@ -97,10 +97,16 @@
{{/if}}