Browse Source

fix:优化评论页面

super-yimizi 1 month ago
parent
commit
b3aef4f88f

+ 2 - 1
application/admin/lang/zh-cn/shop/comment.php

@@ -17,5 +17,6 @@ return [
     'Subscribe'  => '订阅',
     'Createtime' => '创建时间',
     'Updatetime' => '更新时间',
-    'Status'     => '状态'
+    'Status'     => '状态',
+    'Evaluate_status' => '审核状态',
 ];

+ 12 - 0
application/admin/view/shop/comment/add.html

@@ -58,6 +58,18 @@
         </div>
     </div> -->
     <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Evaluate_status')}:</label>
+        <div class="col-xs-12 col-sm-8">
+
+            <div class="radio">
+            {foreach name="evaluateStatusList" item="vo"}
+            <label for="row[evaluate_status]-{$key|htmlentities}"><input id="row[evaluate_status]-{$key|htmlentities}" name="row[audit_status]" type="radio" value="{$key|htmlentities}" {in name="key" value="1"}checked{/in} /> {$vo|htmlentities}</label>
+            {/foreach}
+            </div>
+
+        </div>
+    </div>
+    <div class="form-group">
         <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
         <div class="col-xs-12 col-sm-8">
 

+ 12 - 0
application/admin/view/shop/comment/edit.html

@@ -60,6 +60,18 @@
         </div>
     </div> -->
     <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Evaluate_status')}:</label>
+        <div class="col-xs-12 col-sm-8">
+
+            <div class="radio">
+            {foreach name="evaluateStatusList" item="vo"}
+            <label for="row[evaluate_status]-{$key|htmlentities}"><input id="row[evaluate_status]-{$key|htmlentities}" name="row[audit_status]" type="radio" value="{$key|htmlentities}" {in name="key" value="$row.evaluate_status"}checked{/in} /> {$vo|htmlentities}</label>
+            {/foreach}
+            </div>
+
+        </div>
+    </div>
+    <div class="form-group">
         <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
         <div class="col-xs-12 col-sm-8">
 

+ 1 - 1
application/admin/view/shop/comment/index.html

@@ -1,7 +1,7 @@
 <div class="panel panel-default panel-intro">
     
     <div class="panel-heading">
-        {:build_heading(null,FALSE)}
+        <div class="panel-lead"><em>评论列表</em>用于管理、审核商品评论内容</div>
         <ul class="nav nav-tabs" data-field="evaluate_status">
             <li class="{:$Think.get.evaluate_status === null ? 'active' : ''}"><a href="#t-all" data-value="" data-toggle="tab">{:__('All')}</a></li>
             {foreach name="evaluateStatusList" item="vo" key="key"}

+ 5 - 3
public/assets/js/backend/shop/comment.js

@@ -49,7 +49,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                         {field: 'user_id', title: __('会员信息'), formatter: Table.api.formatter.search,visible: false},
                         {
                             field: 'user.username', 
-                            title: __('User_id'),
+                            title: __('会员信息'),
                             operate: 'LIKE',
                             formatter: function (value, row, index) {
                                 // 显示用户头像和用户名
@@ -63,16 +63,18 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                                        '</div>';
                             }
                         },
-                        {field: 'order_id', title: __('Order_id')},
+                        {field: 'order_id', title: __('订单序号')},
                         // {field: 'pid', title: __('Pid')},
                         {field: 'goods.title', title: __('Goods')},
                         {field: 'star', title: __('Star')},
                         {field: 'content', title: __('Content'), formatter: Controller.api.content},
                         {field: 'images', title: __('Images'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.images},
                         // {field: 'subscribe', title: __('Subscribe')},
+                        {field: 'evaluate_status', title: __('Evaluate_status'), searchList: Controller.api.parseConfigJson('evaluateStatusSearchList'), formatter: Table.api.formatter.status},
+                        {field: 'status', title: __('Status'), searchList: Controller.api.parseConfigJson('statusSearchList'), formatter: Table.api.formatter.status},     
                         {field: 'createtime', title: __('Createtime'), operate: 'RANGE', addclass: 'datetimerange', autocomplete: false, formatter: Table.api.formatter.datetime},
                         {field: 'updatetime', title: __('Updatetime'), operate: 'RANGE', addclass: 'datetimerange', autocomplete: false, formatter: Table.api.formatter.datetime, visible: false},
-                        {field: 'status', title: __('Status'), searchList: Controller.api.parseConfigJson('statusSearchList'), formatter: Table.api.formatter.status},
+                                           
                         {
                             field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate, 
                             buttons: [