nextchild_list.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <?php $shoname_name = D('Home/Front')->get_config_by_name('shoname'); ?>
  6. <title><?php echo $shoname; ?></title>
  7. <link rel="shortcut icon" href="" />
  8. <meta name="renderer" content="webkit">
  9. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  10. <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  11. <link rel="stylesheet" href="/layuiadmin/style/admin.css" media="all">
  12. <!-- 让IE8/9支持媒体查询,从而兼容栅格 -->
  13. <!--[if lt IE 9]>
  14. <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
  15. <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
  16. <![endif]-->
  17. <link href="./resource/css/bootstrap.min.css?v=201903260001" rel="stylesheet">
  18. <link href="./resource/css/common.css?v=201903260001" rel="stylesheet">
  19. <script type="text/javascript">
  20. window.sysinfo = {
  21. <?php if (!empty($_W['uniacid']) ){ ?>'uniacid': '{$_W['uniacid']}',<?php } ?>
  22. <?php if( !empty($_W['acid']) ){ ?>'acid': '{$_W['acid']}',<?php } ?>
  23. <?php if (!empty($_W['openid']) ) { ?>'openid': '{$_W['openid']}',<?php } ?>
  24. <?php if( !empty($_W['uid']) ) { ?>'uid': '{$_W['uid']}',<?php } ?>
  25. 'isfounder': <?php if (!empty($_W['isfounder']) ) { ?>1<?php }else{ ?>0<?php } ?>,
  26. 'siteroot': '{$_W['siteroot']}',
  27. 'siteurl': '{$_W['siteurl']}',
  28. 'attachurl': '{$_W['attachurl']}',
  29. 'attachurl_local': '{$_W['attachurl_local']}',
  30. 'attachurl_remote': '{$_W['attachurl_remote']}',
  31. 'module' : {'url' : '<?php if( defined('MODULE_URL') ) { ?>{MODULE_URL}<?php } ?>', 'name' : '<?php if (defined('IN_MODULE') ) { ?>{IN_MODULE}<?php } ?>'},
  32. 'cookie' : {'pre': ''},
  33. 'account' : {:json_encode($_W['account'])},
  34. };
  35. </script>
  36. <script type="text/javascript" src="./resource/js/lib/jquery-1.11.1.min.js"></script>
  37. <script type="text/javascript" src="./resource/js/lib/bootstrap.min.js"></script>
  38. <script type="text/javascript" src="./resource/js/app/util.js?v=201903260001"></script>
  39. <script type="text/javascript" src="./resource/js/app/common.min.js?v=201903260001"></script>
  40. <script type="text/javascript" src="./resource/js/require.js?v=201903260001"></script>
  41. <script type="text/javascript" src="./resource/js/lib/jquery.nice-select.js?v=201903260001"></script>
  42. <link rel="stylesheet" href="/layuiadmin/layui/css/layui.css" media="all">
  43. <link href="/static/css/snailfish.css" rel="stylesheet">
  44. <style>
  45. .daterangepicker select.ampmselect, .daterangepicker select.hourselect, .daterangepicker select.minuteselect {
  46. width: auto!important;
  47. }
  48. .img-40{width:40px;height:40px;}
  49. </style>
  50. </head>
  51. <body layadmin-themealias="default">
  52. <div class="layui-fluid">
  53. <div class="layui-card">
  54. <div class="layui-card-header layui-elem-quote">当前位置:<span class="line-text">下级会员</span></div>
  55. <div class="layui-card-body" style="padding:15px;">
  56. <form action="" method="get" class="form-horizontal form-search layui-form" role="form">
  57. <input type="hidden" name="c" value="distribution" />
  58. <input type="hidden" name="a" value="nextchild_list" />
  59. <input type="hidden" name="id" value="{$member_id}" />
  60. <div class="layui-form-item">
  61. <div class="layui-inline">
  62. <div class="layui-input-inline">
  63. <input type="text" class="layui-input" name='keyword' value="{$_GPC['keyword']}" placeholder="昵称/姓名/手机号">
  64. </div>
  65. <div class="layui-input-inline">
  66. <button class="layui-btn layui-btn-sm" type="submit"> 搜索</button>
  67. </div>
  68. </div>
  69. </div>
  70. </form>
  71. <form action="" class="layui-form" lay-filter="example" method="post" >
  72. <div class="row">
  73. <div class="col-md-12">
  74. <div class="page-table-header">
  75. </div>
  76. <table class="layui-table" lay-skin="line" lay-size="lg">
  77. <thead>
  78. <tr>
  79. <th style="width:25px;"></th>
  80. <th style="width:60px;">ID</th>
  81. <th style="width: 250px;">用户名</th>
  82. <th style="">等级</th>
  83. <th style="">注册时间</br>审核时间</th>
  84. <th style="width: 250px;text-align:center;">操作</th>
  85. </tr>
  86. </thead>
  87. <tbody>
  88. <?php foreach($list as $row){ ?>
  89. <tr>
  90. <td style="position: relative; ">
  91. <input type='checkbox' name="item_checkbox" lay-skin="primary" value="{$row['member_id']}"/>
  92. </td>
  93. <td>
  94. {$row['member_id']}
  95. </td>
  96. <td style="overflow: visible">
  97. <div rel="pop" style="display: flex" >
  98. <img class="img-40" src="{:tomedia($row['avatar'])}" style='border-radius:50%;border:1px solid #efefef;' />
  99. <span style="display: flex;flex-direction: column;justify-content: center;align-items: flex-start;padding-left: 5px">
  100. <span class="nickname">
  101. <?php if(empty($row['username'])){ ?>未更新<?php }else{ ?>{$row['username']}<?php } ?>
  102. </span>
  103. </span>
  104. </div>
  105. </td>
  106. <td>
  107. {$row['child_level']}级下级
  108. </td>
  109. <td>
  110. {:date("Y-m-d",$row['create_time'])}<br/>{:date("H:i:s",$row['create_time'])}
  111. </td>
  112. <td style="overflow:visible;text-align: center;">
  113. <div class="btn-group">
  114. <a class="layui-btn layui-btn-sm " href="{:U('user/detail',array('id' => $row['member_id']));}" title="">
  115. <span data-toggle="tooltip" data-placement="top" title="" data-original-title="会员详情">
  116. <i class='icow icow-bianji2'></i>查看详情
  117. </span>
  118. </a>
  119. </div>
  120. </td>
  121. </tr>
  122. <?php } ?>
  123. </tbody>
  124. <tfoot>
  125. <tr>
  126. <td colspan="5" style="text-align: right">
  127. {$pager}
  128. </td>
  129. </tr>
  130. </tfoot>
  131. </table>
  132. </div>
  133. </div>
  134. </form>
  135. </div>
  136. </div>
  137. </div>
  138. <script src="/layuiadmin/layui/layui.js"></script>
  139. <script>
  140. layui.config({
  141. base: '/layuiadmin/' //静态资源所在路径
  142. }).extend({
  143. index: 'lib/index' //主入口模块
  144. }).use('index');
  145. </script>
  146. <script>
  147. //由于模块都一次性加载,因此不用执行 layui.use() 来加载对应模块,直接使用即可:
  148. var layer = layui.layer;
  149. var $;
  150. layui.use(['jquery', 'layer','form'], function(){
  151. $ = layui.$;
  152. var form = layui.form;
  153. $('.deldom').click(function(){
  154. var s_url = $(this).attr('data-href');
  155. layer.confirm($(this).attr('data-confirm'), function(index){
  156. $.ajax({
  157. url:s_url,
  158. type:'post',
  159. dataType:'json',
  160. success:function(info){
  161. if(info.status == 0)
  162. {
  163. layer.msg(info.result.message,{icon: 1,time: 2000});
  164. }else if(info.status == 1){
  165. var go_url = location.href;
  166. if( info.result.hasOwnProperty("url") )
  167. {
  168. go_url = info.result.url;
  169. }
  170. layer.msg('操作成功',{time: 1000,
  171. end:function(){
  172. location.href = info.result.url;
  173. }
  174. });
  175. }
  176. }
  177. })
  178. });
  179. })
  180. $('.btn-operation').click(function(){
  181. var ids_arr = [];
  182. var obj = $(this);
  183. var s_toggle = $(this).attr('data-toggle');
  184. var s_url = $(this).attr('data-href');
  185. $("input[name=item_checkbox]").each(function() {
  186. if( $(this).prop('checked') )
  187. {
  188. ids_arr.push( $(this).val() );
  189. }
  190. })
  191. if(ids_arr.length < 1)
  192. {
  193. layer.msg('请选择要操作的内容');
  194. }else{
  195. var can_sub = true;
  196. if( s_toggle == 'batch-remove' )
  197. {
  198. can_sub = false;
  199. layer.confirm($(obj).attr('data-confirm'), function(index){
  200. $.ajax({
  201. url:s_url,
  202. type:'post',
  203. dataType:'json',
  204. data:{ids:ids_arr},
  205. success:function(info){
  206. if(info.status == 0)
  207. {
  208. layer.msg(info.result.message,{icon: 1,time: 2000});
  209. }else if(info.status == 1){
  210. var go_url = location.href;
  211. if( info.result.hasOwnProperty("url") )
  212. {
  213. go_url = info.result.url;
  214. }
  215. layer.msg('操作成功',{time: 1000,
  216. end:function(){
  217. location.href = info.result.url;
  218. }
  219. });
  220. }
  221. }
  222. })
  223. });
  224. }else{
  225. $.ajax({
  226. url:s_url,
  227. type:'post',
  228. dataType:'json',
  229. data:{ids:ids_arr},
  230. success:function(info){
  231. if(info.status == 0)
  232. {
  233. layer.msg(info.result.message,{icon: 1,time: 2000});
  234. }else if(info.status == 1){
  235. var go_url = location.href;
  236. if( info.result.hasOwnProperty("url") )
  237. {
  238. go_url = info.result.url;
  239. }
  240. layer.msg('操作成功',{time: 1000,
  241. end:function(){
  242. location.href = info.result.url;
  243. }
  244. });
  245. }
  246. }
  247. })
  248. }
  249. }
  250. })
  251. form.on('switch(statewsitch)', function(data){
  252. var s_url = $(this).attr('data-href')
  253. var s_value = 1;
  254. if(data.elem.checked)
  255. {
  256. s_value = 1;
  257. }else{
  258. s_value = 0;
  259. }
  260. $.ajax({
  261. url:s_url,
  262. type:'post',
  263. dataType:'json',
  264. data:{comsiss_state:s_value},
  265. success:function(info){
  266. if(info.status == 0)
  267. {
  268. layer.msg(info.result.message,{icon: 1,time: 2000});
  269. }else if(info.status == 1){
  270. var go_url = location.href;
  271. if( info.result.hasOwnProperty("url") )
  272. {
  273. go_url = info.result.url;
  274. }
  275. layer.msg('操作成功',{time: 1000,
  276. end:function(){
  277. location.href = info.result.url;
  278. }
  279. });
  280. }
  281. }
  282. })
  283. });
  284. form.on('checkbox(checkboxall)', function(data){
  285. if(data.elem.checked)
  286. {
  287. $("input[name=item_checkbox]").each(function() {
  288. $(this).prop("checked", true);
  289. });
  290. $("input[name=checkall]").each(function() {
  291. $(this).prop("checked", true);
  292. });
  293. }else{
  294. $("input[name=item_checkbox]").each(function() {
  295. $(this).prop("checked", false);
  296. });
  297. $("input[name=checkall]").each(function() {
  298. $(this).prop("checked", false);
  299. });
  300. }
  301. form.render('checkbox');
  302. });
  303. //监听提交
  304. form.on('submit(formDemo)', function(data){
  305. $.ajax({
  306. url: data.form.action,
  307. type: data.form.method,
  308. data: data.field,
  309. dataType:'json',
  310. success: function (info) {
  311. if(info.status == 0)
  312. {
  313. layer.msg(info.result.message,{icon: 1,time: 2000});
  314. }else if(info.status == 1){
  315. var go_url = location.href;
  316. if( info.result.hasOwnProperty("url") )
  317. {
  318. go_url = info.result.url;
  319. }
  320. layer.msg('操作成功',{time: 1000,
  321. end:function(){
  322. location.href = info.result.url;
  323. }
  324. });
  325. }
  326. }
  327. });
  328. return false;
  329. });
  330. })
  331. </script>
  332. </body>
  333. </html>