home_email.html 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <include file="./Application/Admin/View/head.html"/>
  5. </head>
  6. <body>
  7. <include file="./Application/Admin/View/bread_crumbs.html"/>
  8. <div class="page-container">
  9. <div class="text-c">
  10. <table class="table table-border table-bordered table-hover table-bg">
  11. <thead>
  12. <tr class="text-c">
  13. <th width="50">id</th>
  14. <th width="100">邮箱</th>
  15. <th width="100">创建时间</th>
  16. <th width="100">操作</th>
  17. </tr>
  18. </thead>
  19. <tbody id="data_list">
  20. <foreach name="list" item="v">
  21. <tr class="text-c" data-id="{$v['id']}">
  22. <td>{$v.id}</td>
  23. <td>{$v.email}</td>
  24. <td>{:date('y-m-d H:i',strtotime($v['c_time']))}</td>
  25. <td>
  26. <a title="删除" href="javascript:;" style="text-decoration:none" class="c_del"><i class="Hui-iconfont">&#xe6e2;</i>删除</a>
  27. </td>
  28. </tr>
  29. </foreach>
  30. </tbody>
  31. </table>
  32. <div class="meneame">{$pager}</div>
  33. </div>
  34. </div>
  35. <include file="./Application/Admin/View/foot.html"/>
  36. </body>
  37. <script type="text/javascript">
  38. $(document).ready(function () {
  39. $('#checkbox-admin').on('click', function (e) {
  40. var check = $(this).is(':checked');
  41. if (check == true) {
  42. $('#data_list input:checkbox').prop('checked', true);
  43. } else {
  44. $('#data_list input:checkbox').removeProp('checked');
  45. }
  46. });
  47. //设置已联系
  48. $('.c_del').on('click', function (e) {
  49. var obj = $(this);
  50. //询问框
  51. parent.layer.confirm('确定删除?', {
  52. btn: ['确定', '取消'], //按钮
  53. shade: false //不显示遮罩
  54. }, function (e) {
  55. parent.layer.close(e);
  56. var data = {};
  57. var id = $(obj).parent('td').parent('tr').attr('data-id');
  58. data[0] = {'id': id};
  59. set_del(data);
  60. }, function () {
  61. });
  62. });
  63. });
  64. //设置删除
  65. function set_del(data) {
  66. $.ajax({
  67. type: "post",
  68. dataType: "json",
  69. url: "{:U(CONTROLLER_NAME . '/home_email_del')}",
  70. data: {"data": data},
  71. success: function (data) {
  72. if (data.status == '1') {
  73. parent.layer.msg(data.info, {icon: 1});
  74. location.reload();
  75. } else if (data.status == '0') {
  76. parent.layer.msg(data.info, {icon: 2});
  77. }
  78. }
  79. });
  80. }
  81. </script>
  82. </html>