user.html 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. {include file="public/header"}
  2. <form action="user" method="GET" class="form-inline">
  3. <div class="form-group">
  4. <label>搜索</label>
  5. <select name="type" class="form-control">
  6. <option value="1">用户id</option>
  7. </select>
  8. </div>
  9. <div class="form-group">
  10. <input type="text" class="form-control" name="keyword" placeholder="搜索内容">
  11. </div>
  12. <button type="submit" class="btn btn-primary">搜索</button>
  13. <button type="button" class="btn btn-primary" id="adduser">添加用户</button>
  14. </form>
  15. <div class="table-responsive" style="padding-top: 10px;">
  16. <table class="table table-striped" border='1'>
  17. <thead>
  18. <tr>
  19. <th style="text-align: center;">用户id</th>
  20. <th style="text-align: center;">微信名称</th>
  21. <th style="text-align: center;">微信头像</th>
  22. <th style="text-align: center;">注册手机号</th>
  23. <th style="text-align: center;">用户名称</th>
  24. <th style="text-align: center;">所属分组</th>
  25. <th style="text-align: center;">地址</th>
  26. <th style="text-align: center;">身份</th>
  27. <th style="text-align: center;">添加时间</th>
  28. <th style="text-align: center;">是否审核</th>
  29. <th style="text-align: center;">操作</th>
  30. </tr>
  31. </thead>
  32. <tbody style="text-align: center;">
  33. {volist name="user_info" id="vo"}
  34. <tr>
  35. <td><b>{$vo.id}</b></td>
  36. <td>
  37. {if condition = "$vo.nickname eq null"}
  38. 暂无
  39. {else/}
  40. {$vo.nickname}
  41. {/if}
  42. </td>
  43. <td>
  44. {if condition = "$vo.headimgurl eq null"}
  45. 暂无
  46. {else/}
  47. <img src="{$vo.headimgurl}" alt="微信头像" style="width:30px;border-radius: 50%">
  48. {/if}
  49. </td>
  50. <td>
  51. {if condition = "$vo.telephone eq null"}
  52. 暂无
  53. {else/}
  54. {$vo.telephone}
  55. {/if}
  56. </td>
  57. <td>
  58. {if condition = "$vo.username eq null"}
  59. 暂无
  60. {else/}
  61. {$vo.username}
  62. {/if}
  63. </td>
  64. <td>
  65. {if condition = "$vo.group eq null"}
  66. 暂无
  67. {else/}
  68. {$vo.group}
  69. {/if}
  70. </td>
  71. <td>
  72. {if condition = "$vo.address eq null"}
  73. 暂无
  74. {else/}
  75. {$vo.address}
  76. {/if}
  77. </td>
  78. <td>
  79. {if condition = "$vo.identity eq 0"}
  80. 报修者
  81. {elseif condition = "$vo.identity eq 1" /}
  82. 维修者
  83. {elseif condition = "$vo.identity eq 2" /}
  84. 协管者
  85. {elseif condition = "$vo.identity eq 99" /}
  86. 管理员
  87. {else/}
  88. 暂无
  89. {/if}
  90. </td>
  91. <td>{$vo.addtime}</td>
  92. <td>
  93. {if condition = "$vo.is_register eq 0"}
  94. <font style="color:red;">未审核</font>
  95. {else /}
  96. <font style="color:green;">已审核</font>
  97. {/if}
  98. </td>
  99. <td>
  100. <button data-userid="{$vo['id']}" class="btn btn-xs btn-info buttoninfo">查看</button>
  101. <button data-userid="{$vo['id']}" class="btn btn-xs btn-danger buttoneidt">编辑</button>
  102. </td>
  103. </tr>
  104. {/volist}
  105. </tbody>
  106. <thead>
  107. <tr>
  108. <th style="text-align: center;">用户id</th>
  109. <th style="text-align: center;">微信名称</th>
  110. <th style="text-align: center;">微信头像</th>
  111. <th style="text-align: center;">注册手机号</th>
  112. <th style="text-align: center;">用户名称</th>
  113. <th style="text-align: center;">所属分组</th>
  114. <th style="text-align: center;">地址</th>
  115. <th style="text-align: center;">身份</th>
  116. <th style="text-align: center;">添加时间</th>
  117. <th style="text-align: center;">是否审核</th>
  118. <th style="text-align: center;">操作</th>
  119. </tr>
  120. </thead>
  121. </table>
  122. </div>
  123. <!-- 分页的渲染函数 -->
  124. <div style="text-align:center;">
  125. {$user_info->render()}
  126. </div>
  127. <script src="__LOGIN__/js/jquery.min.js"></script>
  128. <!-- 补单函数的触发 -->
  129. <script>
  130. $(function () {
  131. $('.buttoninfo').click(function () {
  132. //获取当前用户id
  133. let userid = $(this).attr('data-userid');
  134. window.location.href = "__URL__/user_info?user_id=" + userid;
  135. });
  136. $('.buttoneidt').click(function () {
  137. //编辑当前用户
  138. let userid = $(this).attr('data-userid');
  139. window.location.href = "__URL__/edit_user_info?user_id=" + userid;
  140. });
  141. $('#adduser').click(function(){
  142. window.location.href = "__URL__/add_user"; //添加用户
  143. });
  144. });
  145. </script>