list.htm 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. ##tlayout("admin/layout.htm"){
  2. <div class="breadcrumbs" style="height: 50px;">
  3. <div class="breadcrumbs_title">会员管理</div>
  4. </div>
  5. <div class="page-content">
  6. <div class="row" style="margin-top:10px;">
  7. <div class="col-xs-12">
  8. <div class="table-responsive">
  9. <table class="table table-striped table-bordered table-hover">
  10. <thead>
  11. <tr>
  12. <th>姓名</th>
  13. <th>头像</th>
  14. <th>状态</th>
  15. <th>最后登录时间</th>
  16. <th>注册时间</th>
  17. <th>操作</th>
  18. </tr>
  19. </thead>
  20. <tbody>
  21. ##if(results!=null && results.list.~size!=0){
  22. ##for(_item in results.list!){
  23. <tr>
  24. <td>${_item.name!}</td>
  25. <td>
  26. ##if(_item.img_url!=null && _item.img_url!=""){
  27. <img src="${_item.img_url!}" style="height: 60px;" />
  28. ##}
  29. </td>
  30. <td>
  31. ##if(_item.status==1){
  32. 启用
  33. ##}else{
  34. 禁用
  35. ##}
  36. </td>
  37. <td>${_item.last_login_date!,dateFormat='yyyy-MM-dd HH:mm'}</td>
  38. <td>${_item.create_date!,dateFormat='yyyy-MM-dd HH:mm'}</td>
  39. <td style="width:100px;">
  40. <div class="btn-group">
  41. <button class="btn btn-info btn-sm dropdown-toggle" data-toggle="dropdown">
  42. 操作<span class="icon-caret-down icon-on-right"></span>
  43. </button>
  44. <ul class="dropdown-menu dropdown-info pull-right">
  45. ##if(_item.status==1){
  46. <li><a href="javascript:changeStatus(${_item.id!}, 0, '禁用')">禁用</a></li>
  47. ##}else{
  48. <li><a href="javascript:changeStatus(${_item.id!}, 1, '启用')">启用</a></li>
  49. ##}
  50. <li><a href="javascript:changeStatus(${_item.id!}, 9, '删除')">删除</a></li>
  51. </ul>
  52. </div>
  53. </td>
  54. </tr>
  55. ##}
  56. ##}
  57. </tbody>
  58. </table>
  59. ##if(totalPage>1){
  60. <div class="fenye">
  61. <#_pagination page="${results!}">
  62. <ul id="Pagination"></ul>
  63. </#_pagination>
  64. </div>
  65. ##}
  66. </div>
  67. </div>
  68. </div>
  69. </div>
  70. <script>
  71. function changeStatus(id, status, msg){
  72. if(confirm("确定要" + msg + "该记录吗?")){
  73. $.post("/admin/user/changeStatus",{id:id,status:status},function(data){
  74. alert(data.msg);
  75. if(data.success){
  76. location.reload();
  77. }
  78. });
  79. }
  80. }
  81. </script>
  82. ##}