3ef8e481361a9f994a1af0602fc93b24.php 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. <?php if (!defined('THINK_PATH')) exit(); /*a:2:{s:88:"E:\phpStudy\PHPTutorial\WWW\repairceshi\public/../application/admin\view\index\user.html";i:1551241043;s:81:"E:\phpStudy\PHPTutorial\WWW\repairceshi\application\admin\view\public\header.html";i:1551230385;}*/ ?>
  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 else: ?>
  117. 暂无
  118. <?php endif; ?>
  119. </td>
  120. <td><?php echo $vo['addtime']; ?></td>
  121. <td>
  122. <?php if($vo['is_register'] == 0): ?>
  123. <font style="color:red;">未审核</font>
  124. <?php else: ?>
  125. <font style="color:green;">已审核</font>
  126. <?php endif; ?>
  127. </td>
  128. <td>
  129. <button data-userid="<?php echo $vo['id']; ?>" class="btn btn-xs btn-info buttoninfo">查看</button>
  130. <button data-userid="<?php echo $vo['id']; ?>" class="btn btn-xs btn-danger buttoneidt">编辑</button>
  131. </td>
  132. </tr>
  133. <?php endforeach; endif; else: echo "" ;endif; ?>
  134. </tbody>
  135. <thead>
  136. <tr>
  137. <th style="text-align: center;">用户id</th>
  138. <th style="text-align: center;">微信名称</th>
  139. <th style="text-align: center;">微信头像</th>
  140. <th style="text-align: center;">注册手机号</th>
  141. <th style="text-align: center;">用户名称</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. </tr>
  149. </thead>
  150. </table>
  151. </div>
  152. <!-- 分页的渲染函数 -->
  153. <div style="text-align:center;">
  154. <?php echo $user_info->render(); ?>
  155. </div>
  156. <script src="/static/login/js/jquery.min.js"></script>
  157. <!-- 补单函数的触发 -->
  158. <script>
  159. $(function () {
  160. $('.buttoninfo').click(function () {
  161. //获取当前用户id
  162. let userid = $(this).attr('data-userid');
  163. window.location.href = "/admin/index/user_info?user_id=" + userid;
  164. });
  165. $('.buttoneidt').click(function () {
  166. //编辑当前用户
  167. let userid = $(this).attr('data-userid');
  168. window.location.href = "/admin/index/edit_user_info?user_id=" + userid;
  169. });
  170. $('#adduser').click(function(){
  171. window.location.href = "/admin/index/add_user"; //添加用户
  172. });
  173. });
  174. </script>