问答管理优化

This commit is contained in:
devil_gong 2019-06-21 09:50:51 +08:00
parent ccc48556c4
commit 23f2eb2b8b
3 changed files with 8 additions and 8 deletions

View File

@ -217,7 +217,7 @@
<td class="view-operation">
<a href="{{:MyUrl('admin/answer/saveinfo', array_merge($params, ['id'=>$v['id']]))}}" class="am-btn am-btn-secondary am-btn-xs am-radius am-btn-block am-icon-edit"> 编辑</a>
{{if $v['is_reply'] eq 0}}
<button class="am-btn am-btn-success am-btn-xs am-radius am-btn-block submit-reply am-icon-gavel" data-am-modal="{target: '#my-popup-reply'}" data-json='{{:json_encode($v)}}'> 回复</button>
<button class="am-btn am-btn-success am-btn-xs am-radius am-btn-block submit-reply am-icon-gavel" data-am-modal="{target: '#my-popup-reply'}" data-json='{{:str_replace("'", '', json_encode($v))}}'> 回复</button>
{{/if}}
<button class="am-btn am-btn-danger am-btn-xs am-radius am-btn-block am-icon-trash-o submit-delete" data-url="{{:MyUrl('admin/answer/delete')}}" data-id="{{$v.id}}"> 删除</button>
</td>

View File

@ -279,10 +279,10 @@
<button type="button" class="am-btn am-btn-secondary am-btn-xs am-radius am-icon-check am-btn-block submit-ajax" data-url="{{:MyUrl('admin/orderaftersale/confirm')}}" data-id="{{$v.id}}" data-view="reload"> 确认</button>
{{/if}}
{{if $v['status'] eq 2}}
<button type="button" class="am-btn am-btn-secondary am-btn-xs am-radius am-icon-gavel am-btn-block submit-audit" data-json='{{:json_encode($v)}}'> 审核</button>
<button type="button" class="am-btn am-btn-secondary am-btn-xs am-radius am-icon-gavel am-btn-block submit-audit" data-json='{{:str_replace("'", '', json_encode($v))}}'> 审核</button>
{{/if}}
{{if in_array($v['status'], [0,2])}}
<button type="button" class="am-btn am-btn-danger am-btn-xs am-radius am-icon-warning am-btn-block submit-refuse" data-json='{{:json_encode($v)}}'> 拒绝</button>
<button type="button" class="am-btn am-btn-danger am-btn-xs am-radius am-icon-warning am-btn-block submit-refuse" data-json='{{:str_replace("'", '', json_encode($v))}}'> 拒绝</button>
{{/if}}
{{if in_array($v['status'], [1,2])}}
<button type="button" class="am-btn am-btn-warning am-btn-xs am-radius am-icon-paint-brush am-btn-block submit-ajax submit-cancel" data-url="{{:MyUrl('admin/orderaftersale/cancel')}}" data-id="{{$v.id}}" data-view="reload"> 取消</button>

View File

@ -228,11 +228,11 @@ class AnswerService
// 开始操作
$data = [
'user_id' => isset($params['user']['id']) ? intval($params['user']['id']) : (isset($params['user_id']) ? intval($params['user_id']) : 0),
'name' => isset($params['name']) ? str_replace(['"', "'"], '', strip_tags($params['name'])) : '',
'tel' => isset($params['tel']) ? str_replace(['"', "'"], '', strip_tags($params['tel'])) : '',
'title' => isset($params['title']) ? str_replace(['"', "'"], '', strip_tags($params['title'])) : '',
'content' => str_replace(['"', "'"], '', strip_tags($params['content'])),
'reply' => isset($params['reply']) ? str_replace(['"', "'"], '', strip_tags($params['reply'])) : '',
'name' => isset($params['name']) ? $params['name'] : '',
'tel' => isset($params['tel']) ? $params['tel'] : '',
'title' => isset($params['title']) ? $params['title'] : '',
'content' => $params['content'],
'reply' => isset($params['reply']) ? $params['reply'] : '',
'access_count' => isset($params['access_count']) ? intval($params['access_count']) : 0,
'is_reply' => isset($params['is_reply']) ? intval($params['is_reply']) : 0,
'is_show' => isset($params['is_show']) ? intval($params['is_show']) : 0,