cd35bcec9f5b3049b39acfc2961575ee.php 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. <?php if (!defined('THINK_PATH')) exit(); /*a:2:{s:73:"/www/wwwroot/repairceshi/public/../application/admin/view/index/user.html";i:1554263570;s:66:"/www/wwwroot/repairceshi/application/admin/view/public/header.html";i:1554260573;}*/ ?>
  2. <!DOCTYPE html>
  3. <html lang="zh-cn">
  4. <head>
  5. <meta charset="utf-8" />
  6. <meta name="viewport" content="width=device-width, initial-scale=1" />
  7. <title>管理中心</title>
  8. <link href="//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet" />
  9. <script src="//cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>
  10. <script src="//cdn.bootcss.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
  11. </head>
  12. <body>
  13. <nav class="navbar navbar-fixed-top navbar-default">
  14. <div class="container">
  15. <div class="navbar-header">
  16. <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar"
  17. aria-expanded="false" aria-controls="navbar">
  18. <span class="sr-only">导航按钮</span>
  19. <span class="icon-bar"></span>
  20. <span class="icon-bar"></span>
  21. <span class="icon-bar"></span>
  22. </button>
  23. <a class="navbar-brand" href="#">管理中心</a>
  24. </div><!-- /.navbar-header -->
  25. <div id="navbar" class="collapse navbar-collapse">
  26. <ul class="nav navbar-nav navbar-right">
  27. <li>
  28. <a href="/admin/index/index"><span class="glyphicon glyphicon-home"></span> 管理首页</a>
  29. </li>
  30. <li><a href="/admin/index/order"><span class="glyphicon glyphicon-shopping-cart"></span> 订单管理</a></li>
  31. <li><a href="/admin/index/group"><span class="glyphicon glyphicon-user"></span> 分组管理</a></li>
  32. <li><a href="/admin/index/user"><span class="glyphicon glyphicon-user"></span>用户管理</a></li>
  33. <li><a href="/admin/index/loginout"><span class="glyphicon glyphicon-log-out"></span> 退出登陆</a></li>
  34. </ul>
  35. </div><!-- /.navbar-collapse -->
  36. </div><!-- /.container -->
  37. </nav><!-- /.navbar -->
  38. <div class="container" style="padding-top:70px;">
  39. <div class="col-xs-12 col-sm-10 col-lg-11 center-block" style="float: none;">
  40. <form action="user" method="GET" class="form-inline">
  41. <div class="form-group">
  42. <label>搜索</label>
  43. <select name="type" class="form-control">
  44. <option value="1">用户id</option>
  45. </select>
  46. </div>
  47. <div class="form-group">
  48. <input type="text" class="form-control" name="keyword" placeholder="搜索内容">
  49. </div>
  50. <button type="submit" class="btn btn-primary">搜索</button>
  51. <button type="button" class="btn btn-primary" id="adduser">添加用户</button>
  52. </form>
  53. <div class="table-responsive" style="padding-top: 10px;">
  54. <table class="table table-striped" border='1'>
  55. <thead>
  56. <tr>
  57. <th style="text-align: center;">用户id</th>
  58. <th style="text-align: center;">微信名称</th>
  59. <th style="text-align: center;">微信头像</th>
  60. <th style="text-align: center;">注册手机号</th>
  61. <th style="text-align: center;">用户名称</th>
  62. <th style="text-align: center;">所属分组</th>
  63. <th style="text-align: center;">地址</th>
  64. <th style="text-align: center;">身份</th>
  65. <th style="text-align: center;">添加时间</th>
  66. <th style="text-align: center;">是否审核</th>
  67. <th style="text-align: center;">操作</th>
  68. </tr>
  69. </thead>
  70. <tbody style="text-align: center;">
  71. <?php if(is_array($user_info) || $user_info instanceof \think\Collection || $user_info instanceof \think\Paginator): $i = 0; $__LIST__ = $user_info;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
  72. <tr>
  73. <td><b><?php echo $vo['id']; ?></b></td>
  74. <td>
  75. <?php if($vo['nickname'] == null): ?>
  76. 暂无
  77. <?php else: ?>
  78. <?php echo $vo['nickname']; endif; ?>
  79. </td>
  80. <td>
  81. <?php if($vo['headimgurl'] == null): ?>
  82. 暂无
  83. <?php else: ?>
  84. <img src="<?php echo $vo['headimgurl']; ?>" alt="微信头像" style="width:30px;border-radius: 50%">
  85. <?php endif; ?>
  86. </td>
  87. <td>
  88. <?php if($vo['telephone'] == null): ?>
  89. 暂无
  90. <?php else: ?>
  91. <?php echo $vo['telephone']; endif; ?>
  92. </td>
  93. <td>
  94. <?php if($vo['username'] == null): ?>
  95. 暂无
  96. <?php else: ?>
  97. <?php echo $vo['username']; endif; ?>
  98. </td>
  99. <td>
  100. <?php if($vo['group'] == null): ?>
  101. 暂无
  102. <?php else: ?>
  103. <?php echo $vo['group']; endif; ?>
  104. </td>
  105. <td>
  106. <?php if($vo['address'] == null): ?>
  107. 暂无
  108. <?php else: ?>
  109. <?php echo $vo['address']; endif; ?>
  110. </td>
  111. <td>
  112. <?php if($vo['identity'] == 0): ?>
  113. 报修者
  114. <?php elseif($vo['identity'] == 1): ?>
  115. 维修者
  116. <?php elseif($vo['identity'] == 2): ?>
  117. 协管者
  118. <?php elseif($vo['identity'] == 99): ?>
  119. 管理员
  120. <?php else: ?>
  121. 暂无
  122. <?php endif; ?>
  123. </td>
  124. <td><?php echo $vo['addtime']; ?></td>
  125. <td>
  126. <?php if($vo['is_register'] == 0): ?>
  127. <font style="color:red;">未审核</font>
  128. <?php else: ?>
  129. <font style="color:green;">已审核</font>
  130. <?php endif; ?>
  131. </td>
  132. <td>
  133. <button data-userid="<?php echo $vo['id']; ?>" class="btn btn-xs btn-info buttoninfo">查看</button>
  134. <button data-userid="<?php echo $vo['id']; ?>" class="btn btn-xs btn-danger buttoneidt">编辑</button>
  135. </td>
  136. </tr>
  137. <?php endforeach; endif; else: echo "" ;endif; ?>
  138. </tbody>
  139. <thead>
  140. <tr>
  141. <th style="text-align: center;">用户id</th>
  142. <th style="text-align: center;">微信名称</th>
  143. <th style="text-align: center;">微信头像</th>
  144. <th style="text-align: center;">注册手机号</th>
  145. <th style="text-align: center;">用户名称</th>
  146. <th style="text-align: center;">所属分组</th>
  147. <th style="text-align: center;">地址</th>
  148. <th style="text-align: center;">身份</th>
  149. <th style="text-align: center;">添加时间</th>
  150. <th style="text-align: center;">是否审核</th>
  151. <th style="text-align: center;">操作</th>
  152. </tr>
  153. </thead>
  154. </table>
  155. </div>
  156. <!-- 分页的渲染函数 -->
  157. <div style="text-align:center;">
  158. <?php echo $user_info->render(); ?>
  159. </div>
  160. <script src="/static/login/js/jquery.min.js"></script>
  161. <!-- 补单函数的触发 -->
  162. <script>
  163. $(function () {
  164. $('.buttoninfo').click(function () {
  165. //获取当前用户id
  166. let userid = $(this).attr('data-userid');
  167. window.location.href = "/admin/index/user_info?user_id=" + userid;
  168. });
  169. $('.buttoneidt').click(function () {
  170. //编辑当前用户
  171. let userid = $(this).attr('data-userid');
  172. window.location.href = "/admin/index/edit_user_info?user_id=" + userid;
  173. });
  174. $('#adduser').click(function(){
  175. window.location.href = "/admin/index/add_user"; //添加用户
  176. });
  177. });
  178. </script>