index.php 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. <div class="row-content am-cf">
  2. <div class="row">
  3. <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
  4. <div class="widget am-cf">
  5. <div class="widget-head am-cf">
  6. <div class="widget-title am-cf">评价列表</div>
  7. </div>
  8. <div class="widget-body am-fr">
  9. <div class="am-scrollable-horizontal am-u-sm-12">
  10. <table width="100%" class="am-table am-table-compact am-table-striped
  11. tpl-table-black am-text-nowrap">
  12. <thead>
  13. <tr>
  14. <th>ID</th>
  15. <th class="am-text-center">用户</th>
  16. <th>商品图片</th>
  17. <th>商品名称</th>
  18. <th>评分</th>
  19. <th>评价内容</th>
  20. <th>是否有图片</th>
  21. <th>显示状态</th>
  22. <th>评价排序</th>
  23. <th>评价时间</th>
  24. <th>操作</th>
  25. </tr>
  26. </thead>
  27. <tbody>
  28. <?php if (!$list->isEmpty()): foreach ($list as $item): ?>
  29. <tr>
  30. <td class="am-text-middle"><?= $item['comment_id'] ?></td>
  31. <td class="am-text-center">
  32. <p class=""><?= $item['user']['nickName'] ?></p>
  33. <p class="am-link-muted">(用户id:<?= $item['user']['user_id'] ?>)</p>
  34. </td>
  35. <td class="am-text-middle">
  36. <a href="<?= $item['order_goods']['image']['file_path'] ?>"
  37. title="点击查看大图" target="_blank">
  38. <img src="<?= $item['order_goods']['image']['file_path'] ?>"
  39. width="50" height="50" alt="商品图片">
  40. </a>
  41. </td>
  42. <td class="am-text-middle">
  43. <p class="item-title"><?= $item['order_goods']['goods_name'] ?></p>
  44. </td>
  45. <td class="am-text-middle">
  46. <?php if ($item['score'] == 10) : ?>
  47. <span class="x-color-green">好评</span>
  48. <?php elseif ($item['score'] == 20) : ?>
  49. <span class="x-color-yellow">中评</span>
  50. <?php else: ?>
  51. <span class="x-color-red">差评</span>
  52. <?php endif; ?>
  53. </td>
  54. <td class="am-text-middle">
  55. <p class="item-title"><?= $item['content'] ?></p>
  56. </td>
  57. <td class="am-text-middle">
  58. <?php if ($item['is_picture']) : ?>
  59. <span class="x-color-green">是</span>
  60. <?php else: ?>
  61. <span class="">否</span>
  62. <?php endif; ?>
  63. </td>
  64. <td class="am-text-middle">
  65. <?php if ($item['status']) : ?>
  66. <span class="x-color-green">显示</span>
  67. <?php else: ?>
  68. <span class="x-color-red">隐藏</span>
  69. <?php endif; ?>
  70. </td>
  71. <td class="am-text-middle"><?= $item['sort'] ?></td>
  72. <td class="am-text-middle"><?= $item['create_time'] ?></td>
  73. <td class="am-text-middle">
  74. <div class="tpl-table-black-operation">
  75. <?php if (checkPrivilege('apps.sharing.comment/detail')): ?>
  76. <a href="<?= url('apps.sharing.comment/detail', ['comment_id' => $item['comment_id']]) ?>">
  77. <i class="am-icon-pencil"></i> 详情
  78. </a>
  79. <?php endif; ?>
  80. <?php if (checkPrivilege('apps.sharing.comment/delete')): ?>
  81. <a href="javascript:void(0);"
  82. class="item-delete tpl-table-black-operation-del"
  83. data-id="<?= $item['comment_id'] ?>">
  84. <i class="am-icon-trash"></i> 删除
  85. </a>
  86. <?php endif; ?>
  87. <?php if (checkPrivilege('apps.sharing.order/detail')): ?>
  88. <a class="tpl-table-black-operation-default"
  89. href="<?= url('apps.sharing.order/detail', ['order_id' => $item['order_id']]) ?>">
  90. <i class="iconfont icon-order-o"></i> 订单详情
  91. </a>
  92. <?php endif; ?>
  93. </div>
  94. </td>
  95. </tr>
  96. <?php endforeach; else: ?>
  97. <tr>
  98. <td colspan="11" class="am-text-center">暂无记录</td>
  99. </tr>
  100. <?php endif; ?>
  101. </tbody>
  102. </table>
  103. </div>
  104. <div class="am-u-lg-12 am-cf">
  105. <div class="am-fr"><?= $list->render() ?> </div>
  106. <div class="am-fr pagination-total am-margin-right">
  107. <div class="am-vertical-align-middle">总记录:<?= $list->total() ?></div>
  108. </div>
  109. </div>
  110. </div>
  111. </div>
  112. </div>
  113. </div>
  114. </div>
  115. <script>
  116. $(function () {
  117. // 删除元素
  118. var url = "<?= url('apps.sharing.comment/delete') ?>";
  119. $('.item-delete').delete('comment_id', url);
  120. });
  121. </script>