userlist.blade.php1 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413
  1. @extends('base.base')
  2. @section('base')
  3. <!-- 内容区域 -->
  4. <div class="main-panel">
  5. <div class="content-wrapper">
  6. <div class="page-header">
  7. <h3 class="page-title">
  8. <span class="page-title-icon bg-gradient-primary text-white mr-2">
  9. <i class="mdi mdi-settings"></i>
  10. </span>
  11. 用户数据
  12. </h3>
  13. <nav aria-label="breadcrumb">
  14. <ol class="breadcrumb">
  15. <li class="breadcrumb-item"><a href="#">用户数据</a></li>
  16. <li class="breadcrumb-item active" aria-current="page">用户数据</li>
  17. </ol>
  18. </nav>
  19. </div>
  20. <div class="row">
  21. <div class="col-lg-12 grid-margin stretch-card">
  22. <div class="card">
  23. <div class="card-body">
  24. @if ($user_tab != '')
  25. <div>
  26. <a href="#" onclick="javascript:history.back(-1);">返回到上一页</a>
  27. </div>
  28. @endif
  29. <h4 class="card-title">用户数据</h4>
  30. <form class="well form-inline margin-top-20" method="post" action='/admin/global/userlist'>
  31. <div>
  32. @csrf
  33. <spen style="padding-left: 10px" >会员ID:</spen>
  34. <input class="form-control" type="text" name="GameID" id="GameID" style="width: 10%; " value="{{$GameID}}" >
  35. <spen style="padding-left: 10px" >手机号:</spen>
  36. <input class="form-control" type="text" name="RegisterMobile" id="RegisterMobile" style="width: 10%; " value="{{$RegisterMobile}}" >
  37. <spen style="padding-left: 10px" >上级ID:</spen>
  38. <input class="form-control" type="text" name="SpreaderID" id="SpreaderID" style="width: 10%; " value="{{$SpreaderID}}" >
  39. <spen style="padding-left: 10px" >昵称:</spen>
  40. <input class="form-control" type="text" name="Compellation" id="Compellation" style="width: 10%; " value="{{$Compellation}}">
  41. <spen style="padding-left: 10px" >注册时间:</spen>
  42. <input type="datetime-local" step="01" name="start_time" id="start_time" class="form-control" value="{{$start_time}}" onclick="start_times()"/>
  43. <input type="datetime-local" step="01" name="end_time" id='end_time' class="form-control" value="{{$end_time}}" onclick="end_times()"/><br>
  44. <spen style="padding-left: 10px" >渠道名称:</spen>
  45. {{-- <input class="form-control" type="text" name="mobile" style="width: 10%; " value="暂时无法使用" disabled>--}}
  46. <select class="form-control" name="channel" value="{{$channel}}" style="color: black">
  47. <option value="">全部渠道</option>
  48. @foreach($channels as $key=>$val)
  49. <option value="{{$val}}" @if ( $channel == $val )
  50. selected
  51. @endif>{{$val}}</option>
  52. @endforeach
  53. </select> &nbsp;&nbsp;
  54. <input type="hidden" name="user_tab" value="{{$user_tab}}">
  55. <spen style="padding-left: 10px" >当前在线状态:</spen>
  56. <input class="form-control" type="text" name="mobile" style="width: 10%; " value="暂时无法使用" disabled>
  57. <spen style="padding-left: 10px" >VIP筛选:</spen>
  58. <select class="form-control" name="vip" value="{{$vip}}" style="color: black">
  59. <option value="">请选择</option>
  60. @for($i=1;$i<=6;$i++)
  61. @if($vip==$i)
  62. <option value="{{$i}}" selected>VIP {{$i}}</option>
  63. @else
  64. <option value="{{$i}}" >VIP {{$i}}</option>
  65. @endif
  66. @endfor
  67. </select> &nbsp;&nbsp;
  68. <spen style="padding-left: 10px" >账号筛选:</spen>
  69. <select class="form-control" name="accounts_type" value="{{$accounts_type}}" style="color: black">
  70. <option value="">请选择</option>
  71. @foreach($WebLogonTimes as $key=>$val)
  72. @if($accounts_type==$key)
  73. <option value="{{$key}}" selected>{{$val}}</option>
  74. @else
  75. <option value="{{$key}}" >{{$val}}</option>
  76. @endif
  77. @endforeach
  78. </select> &nbsp;&nbsp;
  79. <spen style="padding-left: 10px" >包名筛选:</spen>
  80. <select class="form-control" name="PackgeName" value="{{$PackgeName}}" style="color: black">
  81. <option value="">请选择</option>
  82. @foreach($ChannelPackageName as $val)
  83. @if($PackgeName==$val)
  84. <option value="{{$val}}" selected>{{$val}}</option>
  85. @else
  86. <option value="{{$val}}" >{{$val}}</option>
  87. @endif
  88. @endforeach
  89. </select> &nbsp;&nbsp;
  90. <a href="/admin/global/userlist" class="btn btn-sm btn-gradient-warning btn-icon-text">清空</a>
  91. <input type="submit" class="btn btn-sm btn-gradient-dark btn-icon-text" value="搜索"/>&nbsp;&nbsp;
  92. <br>
  93. <input class="form-control" type="checkbox" name="obj" id="radio" value="1" onclick="search(1)" @isset($obj['checked1']) checked @endisset>游戏中
  94. <input class="form-control" type="checkbox" name="obj" id="radio" value="2" onclick="search(2)" @isset($obj['checked2']) checked @endisset>未实名
  95. <input class="form-control" type="checkbox" name="obj" id="radio" value="3" onclick="search(3)" @isset($obj['checked3']) checked @endisset>无手机号
  96. <input class="form-control" type="checkbox" name="obj" id="radio" value="4" onclick="search(4)" @isset($obj['checked4']) checked @endisset>同IP
  97. <input class="form-control" type="checkbox" name="obj" id="radio" value="5" onclick="search(5)" @isset($obj['checked5']) checked @endisset>无渠道
  98. <input class="form-control" type="checkbox" name="obj" id="radio" value="6" onclick="search(6)" @isset($obj['checked6']) checked @endisset>未充值
  99. <input class="form-control" type="checkbox" name="obj" id="radio" value="7" onclick="search(7)" @isset($obj['checked7']) checked @endisset>无上级
  100. <input class="form-control" type="checkbox" name="obj" id="radio" value="8" onclick="search(8)" @isset($obj['checked8']) checked @endisset>封号中
  101. <input class="form-control" type="checkbox" name="obj" id="radio" value="9" onclick="search(9)" @isset($obj['checked9']) checked @endisset>官方账号
  102. <a href="/admin/global/userlist?excel=1
  103. &GameID={{$GameID}}
  104. &RegisterMobile={{$RegisterMobile}}
  105. &SpreaderID={{$SpreaderID}}
  106. &Compellation={{$Compellation}}
  107. &start_time={{$start_time}}
  108. &end_time={{$end_time}}
  109. &vip={{$vip}}
  110. &channel={{$channel}}"
  111. class="btn btn-sm btn-gradient-light btn-icon-text">导出</a>
  112. @if (!session()->has('hidden'))
  113. <input type="button" onclick="ban(1)" class="btn btn-sm btn-gradient-dark btn-icon-text" value="批量封号"/>&nbsp;&nbsp;
  114. <input type="button" onclick="ban(2)" class="btn btn-sm btn-gradient-dark btn-icon-text" value="批量解封"/>&nbsp;&nbsp;
  115. @endif
  116. </div>
  117. </form>
  118. <table class="table table-bordered">
  119. <thead>
  120. <tr>
  121. <th width="6%">
  122. <center>
  123. <button type="button" id="quan" onclick="checkbox()" class="btn btn-sm btn-gradient-primary btn-icon-text">
  124. 全选/全不选
  125. </button>
  126. </center>
  127. </th>
  128. <th width="6%">会员ID</th>
  129. <th width="4%">昵称</th>
  130. <th width="6%">手机号</th>
  131. <th width="6%">IP</th>
  132. <th width="9%">
  133. <div class="sort_money">
  134. 金豆余额
  135. <svg t="1611284352657" class="icon2" onclick="sort_money_func(this,'asc')"
  136. viewBox="0 0 1024 1024" version="1.1"
  137. xmlns="http://www.w3.org/2000/svg" p-id="4118" width="14">
  138. <path
  139. d="M541.866667 285.866667l345.6 345.6c17.066667 17.066667 17.066667 42.666667 0 59.733333-8.533333 8.533333-19.2 12.8-29.866667 12.8H168.533333c-23.466667 0-42.666667-19.2-42.666666-42.666667 0-10.666667 4.266667-21.333333 12.8-29.866666l343.466666-345.6c17.066667-17.066667 42.666667-17.066667 59.733334 0z"
  140. p-id="4119" fill="#707072">
  141. </path>
  142. </svg>
  143. <svg t="1611283709864" class="icon1" onclick="sort_money_func(this,'desc')"
  144. viewBox="0 0 1024 1024" version="1.1"
  145. xmlns="http://www.w3.org/2000/svg" p-id="3148" width="14">
  146. <path
  147. d="M482.133333 738.133333L136.533333 392.533333c-17.066667-17.066667-17.066667-42.666667 0-59.733333 8.533333-8.533333 19.2-12.8 29.866667-12.8h689.066667c23.466667 0 42.666667 19.2 42.666666 42.666667 0 10.666667-4.266667 21.333333-12.8 29.866666L541.866667 738.133333c-17.066667 17.066667-42.666667 17.066667-59.733334 0z"
  148. p-id="3149" fill="#707071">
  149. </path>
  150. </svg>
  151. </div>
  152. </th>
  153. <th width="6%">上级ID</th>
  154. <th width="6%">VIP等级</th>
  155. <th width="6%">当前在线状态</th>
  156. <th width="6%">注册日期</th>
  157. <th width="6%">渠道名称</th>
  158. <th width="6%">包名</th>
  159. <th width="6%">账号</th>
  160. <th width="8%">账号状态</th>
  161. <th width="6%">设置</th>
  162. </tr>
  163. </thead>
  164. <tbody class="search_checkbox">
  165. @foreach($list as $k=>$item)
  166. <tr>
  167. <td>
  168. <input class="form-control" type="checkbox" name="checkbox" id="{{$item->UserID}}" value="" >
  169. </td>
  170. <td>
  171. <a href="/admin/global/id_find?UserID={{$item->UserID}}">
  172. {{$item->GameID}}
  173. </a>
  174. </td>
  175. <td>{{$item->NickName}}</td>
  176. <td>{{$item->PhoneNum}}</td>
  177. <td>
  178. <p>{{$item->RegisterIP}}</p>
  179. <p>{{$item->ipAddress}}</p>
  180. </td>
  181. <td>{{$item->Score}}</td>
  182. <td>{{$item->ain_GameID}}</td>
  183. <td>{{$item->MemberOrder}}</td>
  184. {{-- <td>无法统计</td>--}}
  185. <td>
  186. @if($item->ServerName != null)
  187. 游戏中({{$item->ServerName}})
  188. @else
  189. 离线
  190. @endif
  191. </td>
  192. <td>{{ date('Y-m-d H:i:s',strtotime($item->RegisterDate))}}</td>
  193. <td>{{$item->Channel}}</td>
  194. <td>{{$item->PackgeName}}</td>
  195. <td>
  196. @if ($item->WebLogonTimes == 2 || !empty($item->PhoneNum) )
  197. 手机号
  198. @elseif($item->WebLogonTimes == 0)
  199. facebook
  200. @elseif($item->WebLogonTimes == 1)
  201. 游客
  202. @endif
  203. </td>
  204. <td>{!! $item->Nullity !!}</td>
  205. <td>
  206. @if (empty(hidden()) || hidden() == 'general_administrator')
  207. <button type="button" class="btn btn-sm btn-gradient-dark btn-icon-text" onclick="update({{$item->UserID}})">
  208. 修改
  209. <i class="mdi mdi-file-check btn-icon-append"></i>
  210. </button>
  211. @endif
  212. </td>
  213. </tr>
  214. @endforeach
  215. </tbody>
  216. </table>
  217. <div class="box-footer clearfix" id = "pages">
  218. 总共 <b>{{ $list->appends([
  219. 'list'=>$list,
  220. 'UserID'=>$UserID,
  221. 'RegisterMobile'=>$RegisterMobile,
  222. 'SpreaderID'=>$SpreaderID,
  223. 'Compellation'=>$Compellation,
  224. 'start_time'=>$start_time,
  225. 'end_time'=>$end_time,
  226. 'vip'=>$vip,
  227. 'accounts_type' => $accounts_type,
  228. 'build_str' => $build_str,
  229. 'Score' => $Score,
  230. 'user_tab' => $user_tab,
  231. 'channel' => $channel,
  232. 'PackgeName'=>$PackgeName
  233. ])->total() }}</b> 条,分为<b>{{ $list->lastPage() }}</b>页
  234. {!! $list->links() !!}
  235. </div>
  236. </div>
  237. </div>
  238. </div>
  239. </div>
  240. </div>
  241. </div>
  242. <script>
  243. var search_arr = [];
  244. var search_arr1 = [];
  245. var first_str = '';
  246. function start_times() {
  247. getFormat('00', '00', '00');
  248. document.getElementById("start_time").value = format
  249. }
  250. function end_times() {
  251. getFormat('23', '59', '59');
  252. document.getElementById("end_time").value = format
  253. }
  254. function update(id){
  255. var page = layer.open({
  256. type: 2,
  257. title: '修改配置',
  258. shadeClose: true,
  259. shade: 0.8,
  260. area: ['70%', '90%'],
  261. content: '/admin/global/user_update?id='+id
  262. });
  263. }
  264. function del(id){
  265. myConfirm("删除操作不可逆,是否继续?",function(){
  266. myRequest("/admin/accusation/del/"+id,"post",{},function(res){
  267. layer.msg(res.msg)
  268. setTimeout(function(){
  269. window.location.reload();
  270. },1500)
  271. });
  272. });
  273. }
  274. function checkbox(){
  275. var num=document.getElementsByName('checkbox');
  276. for(var i=0;i<num.length;i++){
  277. if(num[i].checked){
  278. num[i].checked=false;
  279. }else{
  280. num[i].checked=true;
  281. }
  282. }
  283. }
  284. function ban(ban){
  285. //1封号 2解封
  286. var num=document.getElementsByName('checkbox');
  287. var str='';
  288. for(var i=0;i<num.length;i++){
  289. if(num[i].checked){
  290. str=str+num[i].id+',';
  291. }
  292. }
  293. if (str==''){
  294. alert('请选择要操作的数据');return false;
  295. }
  296. var id=str.substr(0,str.length-1);
  297. myConfirm("是否继续账户操作?",function(){
  298. myRequest("/admin/global/ban","post",{id:id,ban:ban},function(res){
  299. layer.msg(res.msg)
  300. setTimeout(function(){
  301. window.location.reload();
  302. },1500)
  303. });
  304. });
  305. return false;
  306. }
  307. /* function rad(obj){
  308. location.href='/admin/global/userlist?obj='+obj;
  309. }*/
  310. function search(value) {
  311. var start_time = $("#start_time").val();
  312. var end_time = $("#end_time").val();
  313. if (localStorage.getItem('search') === ''){
  314. localStorage.setItem('search',value)
  315. }else {
  316. if (localStorage.getItem('search') !== null){
  317. first_str += localStorage.getItem('search') + ','
  318. }
  319. }
  320. var sub_str = first_str.indexOf(value)
  321. if (sub_str < 0){
  322. first_str += value + ','
  323. }else {
  324. localStorage.removeItem("search");
  325. first_str = first_str.replace(value+',','')
  326. }
  327. search_arr = first_str.split(',')
  328. $.ajax({
  329. type:"get",
  330. url:"/admin/global/userlist",
  331. headers: {
  332. 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
  333. },
  334. data:{search:search_arr,start_time:start_time,end_time:end_time},
  335. success:function(msg){
  336. if(msg){
  337. $(".main-panel").html(msg)
  338. }
  339. }
  340. })
  341. return false;
  342. }
  343. function sort_money_func(obj, val) {
  344. if (val == 'asc') {
  345. $(".sort_money svg:eq(1)").children('path').attr('fill', '#707071');
  346. $(obj).children('path').attr('fill', 'red')
  347. } else {
  348. $(obj).children('path').attr('fill', 'red')
  349. $(".sort_money svg:eq(0)").children('path').attr('fill', '#707071');
  350. }
  351. $.ajax({
  352. type: "post",
  353. url: "/admin/global/userlist",
  354. headers: {
  355. 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
  356. },
  357. data: {Score: val},
  358. success: function (msg) {
  359. if (msg) {
  360. $(".main-panel").html(msg)
  361. }
  362. }
  363. })
  364. }
  365. </script>
  366. @endsection