weikeStoryList.html 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <html xmlns:th="http://www.thymeleaf.org">
  2. <head>
  3. <title>私塾家</title>
  4. <script th:include="sys/common/metaCSS" th:remove="tag"></script>
  5. <script th:include="sys/common/metaJS" th:remove="tag"></script>
  6. </head>
  7. <style>
  8. .tablelink{margin-right:10px;}
  9. .stylecss{
  10. color: red;
  11. }
  12. .select_width{
  13. width: 70px;
  14. }
  15. .date_width{
  16. width: 100px;
  17. }
  18. </style>
  19. <body>
  20. <div class="place">
  21. <span>位置:</span>
  22. <ul class="placeul">
  23. <li><a href="#">微信管理</a></li>
  24. <li><a th:href="@{/sys/problem/weikeStoryList.html}">每天一故事</a></li>
  25. </ul>
  26. </div>
  27. <div class="rightinfo">
  28. <form id="seachform" th:action="@{/sys/problem/weikeStoryList.html}" method="post">
  29. <ul class="seachform">
  30. <li>
  31. <label>名称</label>
  32. <input name="LIKE_name" type="text" class="scinput" th:value="${search.get('LIKE_name')}"/>
  33. </li>
  34. <li>
  35. <label>&nbsp;</label>
  36. <input type="button" class="scbtn" value="查询" />
  37. </li>
  38. <li>
  39. <ul class="toolbar">
  40. <a th:href="@{/sys/problem/weikeStoryAdd.html}"><li class="click"><span><img th:src="@{/static/sys/images/t01.png}" /></span>新增</li></a>
  41. </ul>
  42. </li>
  43. </ul>
  44. </form>
  45. <table class="tablelist">
  46. <thead>
  47. <tr>
  48. <th style="width: 50px;">序号</th>
  49. <th>名称</th>
  50. <th>图片</th>
  51. <th>音频</th>
  52. <th>旁听数</th>
  53. <th>创建时间</th>
  54. <th>操作</th>
  55. </tr>
  56. </thead>
  57. <tbody>
  58. <tr th:each="item:${list}" >
  59. <td th:text="${itemStat.count}" ></td>
  60. <td th:text="${item.name}" ></td>
  61. <td class="imgtd">
  62. <img th:if="${item.imgUrl}!=null" th:src="${imgUrl}+''+${item.imgUrl}" style="width: 50px;height: 50px;" />
  63. </td>
  64. <td>
  65. <audio controls="controls" th:if="${item.audioUrl}" th:src="${imgUrl}+''+${item.audioUrl}" ></audio>
  66. </td>
  67. <td th:text="${item.listen}" ></td>
  68. <td style="width: 141px;" th:text="${#calendars.format(item.createTime,'yyyy-MM-dd HH:mm:ss')}" ></td>
  69. <td>
  70. <a th:href="@{/sys/problem/weikeStoryAdd.html(id=${item.id})}" class="tablelink" >修改</a>
  71. <a href="javascript:;" th:onclick="'deleteById(\''+${item.id}+'\')'" class="tablelink" >删除</a>
  72. </td>
  73. </tr>
  74. </tbody>
  75. </table>
  76. <!-- 分页 -->
  77. <div class="pagin">
  78. <div class="message">共<i class="blue">[[${page.rowCnt}]]</i>条记录,当前显示第&nbsp;<i class="blue">[[${page.pageNo }]]&nbsp;</i>页</div>
  79. <div th:utext='${listNavigatHtml}' th:remove="tag" ></div>
  80. </div>
  81. </div>
  82. </body>
  83. <script type="text/javascript">
  84. function deleteById(id){
  85. layer.confirm("确定删除该目录?",
  86. {icon: 4, btn: ['确定','取消']
  87. }, function(){
  88. $.ajax({
  89. url: '[[${sysUrl}]]/sys/problem/deleteWeikeStory',
  90. type: "post",
  91. data:{
  92. 'id': id
  93. },
  94. dataType: "json",
  95. success:function(data){
  96. if(data.meta.success){
  97. layer.msg("删除成功",{icon:1});
  98. setTimeout(function(){
  99. location.reload();
  100. },1000);
  101. }else{
  102. layer.msg(data.meta.message,{icon:11});
  103. }
  104. }
  105. });
  106. });
  107. }
  108. </script>
  109. </html>