platformuser.html 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <title></title>
  7. <meta name="description" content="">
  8. <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  9. <meta name="robots" content="all,follow">
  10. <!-- Bootstrap CSS-->
  11. <link rel="stylesheet" href="__VENDOR__/bootstrap/css/bootstrap.min.css">
  12. <!-- Font Awesome CSS-->
  13. <link rel="stylesheet" href="__VENDOR__/font-awesome/css/font-awesome.min.css">
  14. <!-- Fontastic Custom icon font-->
  15. <!--<link rel="stylesheet" href="__CSS__/fontastic.css">-->
  16. <link rel="stylesheet" href="__CSS__/iconfont.css">
  17. <!-- Google fonts - Poppins -->
  18. <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Poppins:300,400,700">
  19. <!-- theme stylesheet-->
  20. <link rel="stylesheet" href="__CSS__/style.default.css" id="theme-stylesheet">
  21. <!-- Custom stylesheet - for your changes-->
  22. <link rel="stylesheet" href="__CSS__/custom.css">
  23. <!-- Favicon-->
  24. <link rel="shortcut icon" href="__IMG__/favicon.ico">
  25. <!-- Tweaks for older IEs--><!--[if lt IE 9]>
  26. <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
  27. <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script><![endif]-->
  28. </head>
  29. <body>
  30. <div class="page">
  31. <!-- Main Navbar-->
  32. {include file="layout/header" /}
  33. <div class="page-content d-flex align-items-stretch">
  34. <!-- Side Navbar -->
  35. {include file="layout/navigation" /}
  36. <div class="content-inner">
  37. <!-- Page Header-->
  38. <header class="page-header">
  39. <div class="container-fluid">
  40. <h2 class="no-margin-bottom">用户列表</h2>
  41. </div>
  42. </header>
  43. <!-- Breadcrumb-->
  44. <div class="breadcrumb-holder container-fluid">
  45. <ul class="breadcrumb">
  46. <li class="breadcrumb-item">用户管理</li>
  47. <li class="breadcrumb-item active">用户列表</li>
  48. </ul>
  49. </div>
  50. <section class="tables">
  51. <div class="container-fluid">
  52. <div class="row">
  53. <div class="col-lg-12">
  54. <div class="card">
  55. <div class="card-header d-flex align-items-center">
  56. <h3 class="h4">平台用户</h3>
  57. </div>
  58. <div class="card-body">
  59. <div class="table-responsive">
  60. <table class="table table-striped">
  61. <thead>
  62. <tr>
  63. <th>序号</th>
  64. <th>平台用户名</th>
  65. <th>用户名</th>
  66. <th>注册时间</th>
  67. <th>注册IP</th>
  68. <th>手机号</th>
  69. <th>操作</th>
  70. </tr>
  71. </thead>
  72. <tbody>
  73. <?php foreach ($userList as $k => $v): ?>
  74. <tr>
  75. <th scope="row">{$k+1}</th>
  76. <td>{$v['platform_user']}</td>
  77. <td>{$v['user_name']}</td>
  78. <td><?php echo date('Y-m-d H:i',$v['user_platform_rtime']); ?></td>
  79. <td>{$v['user_platform_rip']}</td>
  80. <td>{$v['user_phone']}</td>
  81. <td>
  82. <span onclick="deleteUser({$v['user_platform_id']})" style="color: #ce2714; cursor:pointer" class="icon iconfont icon-delete" title="删除"></span>
  83. </td>
  84. </tr>
  85. <?php endforeach; ?>
  86. </tbody>
  87. </table>
  88. <ul class="list-unstyled" style="display: flex; justify-content: end;">
  89. <?php if (count($page) > 1): ?>
  90. <?php foreach ($page as $k => $v): ?>
  91. <li>
  92. <a onclick="changePage({$v})" style="{$currentPage == $v ? 'pointer-events:none;' : ''}" class="btn btn-xs {$currentPage == $v ? 'btn-secondary' : ''}">{$v}</a>
  93. </li>
  94. <?php endforeach; ?>
  95. <?php endif; ?>
  96. </ul>
  97. </div>
  98. </div>
  99. </div>
  100. </div>
  101. </div>
  102. </div>
  103. </section>
  104. <!-- Page Footer-->
  105. {include file="layout/footer" /}
  106. </div>
  107. </div>
  108. </div>
  109. <!-- JavaScript files-->
  110. <script src="__VENDOR__/jquery/jquery.min.js"></script>
  111. <script src="__VENDOR__/popper.js/umd/popper.min.js"> </script>
  112. <script src="__VENDOR__/bootstrap/js/bootstrap.min.js"></script>
  113. <script src="__VENDOR__/jquery.cookie/jquery.cookie.js"> </script>
  114. <script src="__VENDOR__/chart.js/Chart.min.js"></script>
  115. <script src="__VENDOR__/jquery-validation/jquery.validate.min.js"></script>
  116. <script src="__JS__/jquery.form.js"></script>
  117. <script src="__JS__/plugins/layer/layer.min.js"></script>
  118. <!-- Main File-->
  119. <script src="__JS__/front.js"></script>
  120. <script>
  121. function onSearch() {
  122. let userName = $("#userName").val();
  123. let urlParam = '';
  124. if (userName) {
  125. urlParam = "{:url('admin/index/userlist')}"+"?userName="+userName;
  126. } else {
  127. urlParam = "{:url('admin/index/userlist')}";
  128. }
  129. window.location.href = urlParam;
  130. }
  131. function deleteUser(id) {
  132. let msg = '确认删除该关联关系';
  133. layer.confirm(msg, {icon: 3, title:'提示'}, function(index){
  134. $.getJSON("{:url('admin/index/delPlatUser')}", {'id' : id}, function(res){
  135. if(1 == res.code){
  136. layer.alert(res.msg, {title: '友情提示', icon: 1, closeBtn: 0}, function(){
  137. location.reload();
  138. });
  139. }else if(111 == res.code){
  140. window.location.reload();
  141. }else{
  142. layer.alert(res.msg, {title: '友情提示', icon: 2});
  143. }
  144. });
  145. layer.close(index);
  146. })
  147. }
  148. function changePage(page) {
  149. let param = getQueryString();
  150. param.currentPage = page;
  151. let urlParam = "{:url('admin/index/platformUser')}"+"?"+putUrlParam(param);
  152. window.location.href = urlParam;
  153. }
  154. // 获取URL参数.
  155. function getQueryString() {
  156. var qs = location.search.substr(1), // 获取url中"?"符后的字串
  157. args = {}, // 保存参数数据的对象
  158. items = qs.length ? qs.split("&") : [], // 取得每一个参数项
  159. item = null,
  160. len = items.length;
  161. for(var i = 0; i < len; i++) {
  162. item = items[i].split("=");
  163. var name = decodeURIComponent(item[0]),
  164. value = decodeURIComponent(item[1]);
  165. if(name) {
  166. args[name] = value;
  167. }
  168. }
  169. return args;
  170. }
  171. // 对象转URL参数
  172. function putUrlParam(param) {
  173. let urlParam = '';
  174. let n = 1;
  175. for(let key in param){
  176. if (n === 1) {
  177. urlParam = key+'='+param[key];
  178. } else {
  179. urlParam += '&'+key+'='+param[key];
  180. }
  181. n++;
  182. }
  183. return urlParam;
  184. }
  185. </script>
  186. </body>
  187. </html>