截流自动化的商城平台
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

detail.html 5.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. {layout name="layout2" /}
  2. <style>
  3. .div-flex {
  4. display: flex;
  5. align-items: center;
  6. justify-content: left;
  7. }
  8. .width-160 {
  9. width: 200px;
  10. }
  11. .image {
  12. height: 60px;
  13. width: 60px;
  14. margin-right: 5px;
  15. }
  16. </style>
  17. <div class="layui-card-body">
  18. <!--基本信息-->
  19. <div class="layui-form" lay-filter="layuiadmin-form-order" id="layuiadmin-form-order">
  20. <input type="hidden" id="article_id" name="id" value="{$detail.id}">
  21. <div class="layui-form-item">
  22. <fieldset class="layui-elem-field layui-field-title">
  23. <legend>用户信息</legend>
  24. </fieldset>
  25. </div>
  26. <div class="layui-form-item div-flex">
  27. <label class="layui-form-label ">昵称:</label>
  28. <div class="width-160">{$detail.user.nickname}</div>
  29. <label class="layui-form-label ">编号:</label>
  30. <div class="width-160">{$detail.user.sn}</div>
  31. </div>
  32. <div class="layui-form-item">
  33. <fieldset class="layui-elem-field layui-field-title">
  34. <legend>种草内容</legend>
  35. </fieldset>
  36. </div>
  37. <div class="layui-form-item div-flex">
  38. <label class="layui-form-label ">分类:</label>
  39. <div class="width-160">{$detail.cate_name}</div>
  40. <label class="layui-form-label ">话题:</label>
  41. <div class="width-160">{$detail.topic.name | default= ''}</div>
  42. <label class="layui-form-label ">发布时间:</label>
  43. <div class="width-160">{$detail.create_time}</div>
  44. </div>
  45. <div class="layui-form-item div-flex">
  46. <label class="layui-form-label ">点赞:</label>
  47. <div class="width-160">{$detail.like}</div>
  48. <label class="layui-form-label ">评论:</label>
  49. <div class="width-160">{$detail.comment}</div>
  50. <label class="layui-form-label ">审核状态:</label>
  51. <div class="width-160">{$detail.status_desc}</div>
  52. </div>
  53. <div class="layui-form-item div-flex">
  54. <label class="layui-form-label ">发布内容:</label>
  55. <div class="width-160">{$detail.content}</div>
  56. </div>
  57. <div class="layui-form-item div-flex">
  58. <label class="layui-form-label ">发布图片:</label>
  59. <div>
  60. {volist name="detail.images" id="vo"}
  61. <img src="{$vo.image}" class="image-show image">
  62. {/volist}
  63. </div>
  64. </div>
  65. <div class="layui-form-item div-flex">
  66. <label class="layui-form-label ">审核时间:</label>
  67. <div class="width-160">{$detail.audit_time}</div>
  68. </div>
  69. <div class="layui-form-item div-flex">
  70. <label class="layui-form-label ">审核说明:</label>
  71. <div class="width-160">{$detail.audit_remark}</div>
  72. </div>
  73. <div class="layui-form-item">
  74. <fieldset class="layui-elem-field layui-field-title">
  75. <legend>种草数据</legend>
  76. </fieldset>
  77. </div>
  78. <div class="layui-form-item">
  79. <div class="layui-tab layui-tab-card" lay-filter="tab-all">
  80. <ul class="layui-tab-title">
  81. <li data-type='comment' class="layui-this">评论</li>
  82. <li data-type='like' >点赞</li>
  83. </ul>
  84. <div class="layui-tab-item layui-show">
  85. <div class="layui-card-body">
  86. <table id="like-table-lists" lay-filter="like-table-lists"></table>
  87. <script type="text/html" id="table-userInfo">
  88. <div class="layui-inline" style="text-align:left;">
  89. <p>用户编号:{{d.sn}}</p>
  90. <p>用户昵称:{{d.nickname}}</p>
  91. </div>
  92. </script>
  93. </div>
  94. </div>
  95. </div>
  96. </div>
  97. </div>
  98. </div>
  99. <script type="text/javascript">
  100. layui.config({
  101. version: "{$front_version}",
  102. base: '/static/lib/'
  103. }).use(['form', 'table', 'element'], function () {
  104. var $ = layui.$;
  105. var table = layui.table;
  106. var element = layui.element;
  107. //主图放大
  108. $(document).on('click', '.image-show', function () {
  109. var src = $(this).attr('src');
  110. like.showImg(src, 400);
  111. });
  112. //获取列表
  113. getList('comment');
  114. //切换列表
  115. element.on('tab(tab-all)', function (data) {
  116. var type = $(this).attr('data-type');
  117. getList(type);
  118. });
  119. function getList(type) {
  120. var cols = [
  121. {field: 'user', title: '用户信息', align: 'center', templet: "#table-userInfo"}
  122. , {field: 'create_time', title: '点赞时间', align: 'center'}
  123. ];
  124. if (type === 'comment') {
  125. cols = [
  126. {field: 'user', title: '评论用户', align: 'center', templet: "#table-userInfo"}
  127. , {field: 'comment', title: '评论内容', align: 'center'}
  128. , {field: 'create_time', title: '评价时间', align: 'center'}
  129. ];
  130. }
  131. var id = $('#article_id').val();
  132. like.tableLists("#like-table-lists", '{:url("community.CommunityArticle/detail")}?type='+ type + '&id=' + id, cols);
  133. }
  134. });
  135. </script>