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}} {{$v.title}} - {{$v.content}} - + +
+ {{$v.content|raw}} +
+ + {{if !empty($v['reply'])}} - {{$v.reply}} +
+ {{$v.reply|raw}} +
{{else /}} 未回复 {{/if}} @@ -160,7 +166,7 @@
{{if empty($v['title'])}}未填写{{else /}}{{$v.title}}{{/if}}
内容
-
{{$v.content}}
+
{{$v.content|raw}}
是否显示
{{if empty($v['is_show_text'])}}未填写{{else /}}{{$v.is_show_text}}{{/if}}
@@ -168,7 +174,7 @@
回复内容
{{if !empty($v['reply'])}} - {{$v.reply}} + {{$v.reply|raw}} {{else /}} 未回复 {{/if}} diff --git a/application/admin/view/default/answer/save_info.html b/application/admin/view/default/answer/save_info.html index e5766ae59..5199ccf9e 100644 --- a/application/admin/view/default/answer/save_info.html +++ b/application/admin/view/default/answer/save_info.html @@ -33,11 +33,11 @@
- +
- +
diff --git a/application/plugins/view/answers/index/detail.html b/application/plugins/view/answers/index/detail.html index 38a9c9a13..e13513e2e 100644 --- a/application/plugins/view/answers/index/detail.html +++ b/application/plugins/view/answers/index/detail.html @@ -24,7 +24,7 @@ {{/if}}

阅读数:{{$plugins_answers_detail.data.access_count}}

-
{{$plugins_answers_detail.data.content}}
+
{{$plugins_answers_detail.data.content|raw}}