dk_userlist.blade.php 42 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893
  1. @extends('base.base')
  2. @section('base')
  3. <style>
  4. .fill {
  5. fill: #070700;
  6. }
  7. .infoWin {
  8. position: fixed;
  9. right: 1px;
  10. bottom: 10px;
  11. height: 80%;
  12. width: 40px;
  13. }
  14. .shuli {
  15. width: 46px;
  16. /*border: 1px solid #fe6500;*/
  17. height: 200px;
  18. margin-top: -1px;
  19. line-height: 70px;
  20. padding-top: 25px;
  21. word-wrap: break-word; /*英文的时候需要加上这句,自动换行*/
  22. text-align: center;
  23. cursor: pointer;
  24. }
  25. </style>
  26. <!-- 内容区域 -->
  27. <div class="main-panel">
  28. <div class="content-wrapper">
  29. <div class="page-header">
  30. <h3 class="page-title">
  31. <span class="page-title-icon bg-gradient-primary text-white mr-2">
  32. <i class="mdi mdi-settings"></i>
  33. </span>
  34. {{ __('auto.用户单控系统实时数据') }}
  35. </h3>
  36. <nav aria-label="breadcrumb">
  37. <ol class="breadcrumb">
  38. <li class="breadcrumb-item"><a href="#">{{ __('auto.用户单控系统实时数据') }}</a></li>
  39. <li class="breadcrumb-item active" aria-current="page">{{ __('auto.用户单控系统实时数据') }}</li>
  40. </ol>
  41. </nav>
  42. </div>
  43. <div class="row">
  44. <div class="col-lg-12 grid-margin stretch-card">
  45. <div class="card">
  46. <div class="infoWin">
  47. <a onclick="dk_refresh()" class="shuli btn btn-sm btn-gradient-success"
  48. href="javascript:void(0);">{{ __('auto.刷') }} <br> {{ __('auto.新') }}</a>
  49. </div>
  50. <div class="card-body">
  51. <h4 class="card-title">{{ __('auto.用户单控系统实时数据') }}</h4>
  52. <form class="well form-inline margin-top-20" method="post"
  53. action='/admin/global/dk_userlist'>
  54. <div>
  55. @csrf
  56. <spen style="padding-left: 10px">{{ __('auto.会员ID:') }}</spen>
  57. <input class="form-control" type="text" name="GameID"
  58. placeholder="{{ __('auto.请输入数字') }}" style="width: 10%; " value="{{$GameID}}">
  59. <spen style="padding-left: 10px">{{ __('auto.上级ID:') }}</spen>
  60. <input class="form-control" type="text" name="SpreaderID" id="SpreaderID"
  61. placeholder="{{ __('auto.请输入数字') }}" style="width: 10%; " value="{{$SpreaderID}}">
  62. <spen style="padding-left: 10px">{{ __('auto.昵称:') }}</spen>
  63. <input class="form-control" type="text" name="NickName" id="Compellation"
  64. style="width: 10%; " value="{{$NickName}}">
  65. <spen style="padding-left: 10px">{{ __('auto.注册时间:') }}</spen>
  66. <input type="datetime-local" step="01" name="start_time" id="start_time"
  67. class="form-control" value="{{$start_time}}" onclick="start_times()"/>
  68. <input type="datetime-local" step="01" name="end_time" id='end_time'
  69. class="form-control" value="{{$end_time}}" onclick="end_times()"/><br>
  70. <select class="form-control" name="is_line" value="" style="color: black">
  71. <option value="">{{ __('auto.当前在线状态') }}</option>
  72. <option value="1" @if(1 == $is_line) selected @endif>{{ __('auto.游戏中') }}</option>
  73. <option value="2" @if(2 == $is_line) selected @endif>{{ __('auto.离线') }}</option>
  74. </select>
  75. <select class="form-control" name="game_room" value="" style="color: black">
  76. <option value="">{{ __('auto.当前游戏房间') }}</option>
  77. @foreach($game_room_line as $item)
  78. <option value="{{$item->ServerID}}"
  79. @if($item->ServerID == $game_room) selected @endif>{{$item->ServerName}}</option>
  80. @endforeach
  81. </select>
  82. <select class="form-control" name="Channel" value="" style="color: black">
  83. <option value="">{{ __('auto.渠道搜索') }}</option>
  84. @foreach($allChannel as $key=>$val)
  85. <option value="{{$val}}"
  86. @if($val == $Channel) selected @endif>{{$val}}</option>
  87. @endforeach
  88. </select>
  89. <select class="form-control" name="UserScoreControl" value="" style="color: black">
  90. <option value="">{{ __('auto.受控制状态') }}</option>
  91. <option value="1" @if(1 == $UserScoreControl)selected @endif>{{ __('auto.受控制用户') }}</option>
  92. <option value="2" @if(2 == $UserScoreControl)selected @endif>{{ __('auto.未受控制用户') }}</option>
  93. <option value="3" @if(3 == $UserScoreControl)selected @endif>{{ __('auto.自动控制') }}+{{ __('auto.单控中') }}</option>
  94. <option value="4" @if(4 == $UserScoreControl)selected @endif>{{ __('auto.自动控制中') }}</option>
  95. </select>
  96. <input type="hidden" name="Score" value="{{$ScoreSort}}">
  97. <input type="hidden" name="amount" value="{{$amountSort}}">
  98. <input type="hidden" name="sort_tx" value="{{$sort_tx}}">
  99. <input type="hidden" name="sort_date" value="{{$sort_date}}">
  100. <input type="hidden" name="ChangeScore" value="{{$ChangeScoreSort}}">
  101. <input type="hidden" name="label_sort" value="{{$label_sort}}">
  102. <input type="hidden" name="ServerNameSort" value="{{$ServerNameSort}}">
  103. <input type="submit" class="btn btn-sm btn-gradient-primary btn-icon-text"
  104. value="{{ __('auto.搜索') }}"/>&nbsp;&nbsp;
  105. <a href="/admin/global/dk_userlist" style="color: white">
  106. <button type="button" class="btn btn-sm btn-gradient-dark btn-icon-text">
  107. {{ __('auto.重置') }}
  108. </button>
  109. </a>
  110. </div>
  111. </form>
  112. <table class="table table-bordered">
  113. <thead>
  114. <tr>
  115. <th>{{ __('auto.状态') }}</th>
  116. <th>
  117. <div class="userLabel">
  118. {{ __('auto.会员') }}ID
  119. {!! sortHtml('userLabel') !!}
  120. </div>
  121. </th>
  122. <th>{{ __('auto.渠道') }}</th>
  123. <th width="4%">{{ __('auto.用户标签') }}</th>
  124. <th>
  125. <div class="sort_money">
  126. {{ __('auto.金币余额') }}
  127. {!! sortHtml('sort_money_func') !!}
  128. </div>
  129. </th>
  130. <th>
  131. <div class="ChangeScore">
  132. {{ __('auto.历史/今日总盈利') }}
  133. {!! sortHtml('ChangeScore_func') !!}
  134. </div>
  135. </th>
  136. <th>
  137. <div class="sort_cz">
  138. {{ __('auto.历史/今日充值') }}
  139. <svg t="1611284352657" class="icon2" onclick="sort_cz_func(this,'asc')"
  140. viewBox="0 0 1024 1024" version="1.1"
  141. xmlns="http://www.w3.org/2000/svg" p-id="4118" width="14">
  142. <path
  143. 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"
  144. p-id="4119" fill="#707072">
  145. </path>
  146. </svg>
  147. <svg t="1611283709864" class="icon1" onclick="sort_cz_func(this,'desc')"
  148. viewBox="0 0 1024 1024" version="1.1"
  149. xmlns="http://www.w3.org/2000/svg" p-id="3148" width="14">
  150. <path
  151. 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"
  152. p-id="3149" fill="#707071">
  153. </path>
  154. </svg>
  155. </div>
  156. </th>
  157. <th>
  158. <div class="sort_tx">
  159. {{ __('auto.历史/今日茶叶') }}
  160. <svg t="1611284352657" class="icon2" onclick="sort_tx_func(this,'asc')"
  161. viewBox="0 0 1024 1024" version="1.1"
  162. xmlns="http://www.w3.org/2000/svg" p-id="4118" width="14">
  163. <path
  164. 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"
  165. p-id="4119" fill="#707072">
  166. </path>
  167. </svg>
  168. <svg t="1611283709864" class="icon1" onclick="sort_tx_func(this,'desc')"
  169. viewBox="0 0 1024 1024" version="1.1"
  170. xmlns="http://www.w3.org/2000/svg" p-id="3148" width="14">
  171. <path
  172. 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"
  173. p-id="3149" fill="#707071">
  174. </path>
  175. </svg>
  176. </div>
  177. </th>
  178. <th>
  179. <div class="Handsel">
  180. {{ __('auto.历史/今日彩金') }}
  181. {!! sortHtml('Handsel_func') !!}
  182. </div>
  183. </th>
  184. <th>
  185. <div class="sort_date">
  186. {{ __('auto.注册时间') }}
  187. {!! sortHtml('sort_date_func') !!}
  188. </div>
  189. </th>
  190. <th>{{ __('auto.未领邮件金币') }}</th>
  191. <th>{{ __('auto.可茶叶') }}</th>
  192. <th width="8%">{{ __('auto.控制状态') }}</th>
  193. <th width="8%">{{ __('auto.捕鱼控制') }}</th>
  194. <th>{{ __('auto.单控记录') }}</th>
  195. <th>{{ __('auto.关联') }}IP</th>
  196. <th>{{ __('auto.备注') }}</th>
  197. <th>{{ __('auto.用户控制') }}</th>
  198. </tr>
  199. </thead>
  200. <tbody>
  201. @foreach($list as $item)
  202. <tr>
  203. <td>
  204. @if(!empty($item->ServerName) )
  205. <span style="color: green">{{ __('auto.游戏中') }}({{$item->ServerName ?? ''}})</span>
  206. @else
  207. {{ __('auto.离线') }}
  208. @endif
  209. </td>
  210. <td>
  211. <a href="/admin/global/id_find?UserID={{$item->UserID}}">
  212. @if (!isset($item->IDColor) || $item->IDColor == 0)
  213. <span style="color: red">{{$item->GameID}}</span>
  214. @elseif($item->IDColor == 1)
  215. <span style="color: blue">{{$item->GameID}}</span>
  216. @else
  217. <span style="color: black">{{$item->GameID}}</span>
  218. @endif
  219. </a>
  220. </td>
  221. <td>{{ $item->Channel }}</td>
  222. <td onclick="update_label({{$item->UserID}})">{{$item->user_label ?? __('auto.普通会员')}}</td>
  223. <td>{{$item->Score}}</td>
  224. <td>{{ $item->todayScore ?? 0 }}/{{$item->totalScore ?? 0}}</td>
  225. <td onclick="Recharge(1,{{$item->GameID}})">
  226. <span
  227. onclick="Recharge(1,{{$item->GameID}})">{{$item->totalRecharge ?? 0}}</span>
  228. /
  229. <span
  230. onclick="Recharge(2,{{$item->GameID}})">{{$item->todayRecharge ?? 0}}</span>
  231. </td>
  232. <td>
  233. <span
  234. onclick="Cash(1,{{$item->GameID}})">{{$item->totalWithdraw ?? 0}}</span>
  235. /
  236. <span
  237. onclick="Cash(2,{{$item->GameID}})">{{$item->todayWithdraw ?? 0}}</span>
  238. </td>
  239. <td>
  240. {{$item->historyHandsel ?? 0}}/{{$item->todayHandsel ?? 0}}
  241. </td>
  242. <td>{{$item->RegisterDate}}</td>
  243. <td>{{$item->notReceived}}</td>
  244. <td>{{ $item->CashAble }}</td>
  245. <td>
  246. @if ($item->RecordRechargeControl == 1)
  247. {{ __('auto.自动控制') }} <br>
  248. @endif
  249. @empty($item->ControlScore)
  250. {{ __('auto.无') }}
  251. @elseif ($item->ControlScore < 0)
  252. {{ __('auto.单控中') }} {{$item->EffectiveScore}} / {{$item->ControlScore}}
  253. / {{$item->control_record}} {{ __('auto.输') }}
  254. @elseif ($item->ControlScore > 0)
  255. {{ __('auto.单控中') }} {{ __('auto.赢') }}{{$item->EffectiveScore}} / {{$item->ControlScore}}
  256. {{$item->control_record}}
  257. @endempty
  258. </td>
  259. <td>{{$item->fishControl ?? ''}}</td>
  260. <td>
  261. <button class="btn btn-sm btn-gradient-danger"
  262. onclick="show_control_log('{{$item->GameID}}')">{{ __('auto.查看') }}
  263. </button>
  264. </td>
  265. <td>
  266. @if ($item->LoginIpCount > 0)
  267. <a href="/admin/global/join?id=4&UserID={{$item->UserID}}">
  268. {{$item->LoginIpCount}}
  269. </a>
  270. @else
  271. {{$item->LoginIpCount}}
  272. @endif
  273. </td>
  274. <td contentEditable="true"
  275. onblur="remarks(this,{{$item->UserID}})">{{$item->Remarks}}</td>
  276. <td>
  277. <button type="button" data-method="offset" data-type="auto"
  278. class="btn btn-sm btn-gradient-dark btn-icon-text"
  279. onclick="update({{$item->UserID ?? ""}})">
  280. {{ __('auto.修改') }}
  281. <i class="mdi mdi-file-check btn-icon-append"></i>
  282. </button>
  283. <button class="btn btn-sm btn-gradient-dark" id="fish"
  284. onclick="fishFunc({{$item->UserID}});return false;">{{ __('auto.捕鱼控制') }}
  285. </button>
  286. </td>
  287. </tr>
  288. @endforeach
  289. </tbody>
  290. </table>
  291. <div class="box-footer clearfix" id="pages">
  292. {{ __('auto.总共') }} <b>{{ $list->appends([
  293. 'list'=>$list,
  294. 'GameID'=>$GameID,
  295. 'SpreaderID'=>$SpreaderID,
  296. 'NickName'=>$NickName,
  297. 'start_time'=>$start_time,
  298. 'end_time'=>$end_time,
  299. 'is_line' => $is_line,
  300. 'game_room' => $game_room,
  301. 'label' => $user_label,
  302. 'Score' => $ScoreSort,
  303. 'amount' => $amountSort,
  304. 'sort_tx' => $sort_tx,
  305. 'sort_date' => $sort_date,
  306. 'ChangeScore' => $ChangeScoreSort,
  307. 'UserScoreControl' => $UserScoreControl,
  308. 'Channel' => $Channel,
  309. 'label_sort' => $label_sort,
  310. 'ServerNameSort' => $ServerNameSort
  311. ])->total() }}</b> {{ __('auto.条,分为') }}<b>{{ $list->lastPage() }}</b>{{ __('auto.页') }}
  312. {!! $list->links() !!}
  313. </div>
  314. </div>
  315. </div>
  316. </div>
  317. </div>
  318. </div>
  319. </div>
  320. <script>
  321. data_obj = {
  322. 'GameID': "{{$GameID}}",
  323. 'SpreaderID': "{{$SpreaderID}}",
  324. 'NickName': "{{$NickName}}",
  325. 'start_time': "{{$start_time}}",
  326. 'end_time': "{{$end_time}}",
  327. 'is_line': "{{$is_line}}",
  328. 'game_room': "{{$game_room}}",
  329. 'label': "{{$user_label}}",
  330. 'Score': "{{$ScoreSort}}",
  331. 'amount': "{{$amountSort}}",
  332. 'sort_tx': "{{$sort_tx}}",
  333. 'sort_date': "{{$sort_date}}",
  334. 'ChangeScore': "{{$ChangeScoreSort}}",
  335. 'UserScoreControl': "{{$UserScoreControl}}",
  336. 'Channel': "{{$Channel}}",
  337. 'label_sort': "{{$label_sort}}",
  338. 'page':{{$page}},
  339. 'ServerNameSort':"{{$ServerNameSort}}"
  340. };
  341. function fishFunc(UserID) {
  342. var page = layer.open({
  343. type: 2,
  344. title: '{{ __('auto.捕鱼配置') }}',
  345. shadeClose: true,
  346. shade: 0.8,
  347. area: ['70%', '80%'],
  348. content: '/admin/Control/fish_add/'+UserID,
  349. });
  350. }
  351. function Recharge(type, GameID) {
  352. if (type == 1) {
  353. var page = layer.open({
  354. type: 2,
  355. title: '{{ __('auto.总充值') }}',
  356. shadeClose: true,
  357. offset: 't',
  358. shade: 0.8,
  359. area: ['60%', '80%'],
  360. content: "/admin/recharge/list?UserID=" + GameID + "&recharge_type=1&isEmpty=1",
  361. })
  362. } else {
  363. var page = layer.open({
  364. type: 2,
  365. title: '{{ __('auto.今日充值') }}',
  366. shadeClose: true,
  367. shade: 0.8,
  368. offset: 't',
  369. area: ['70%', '80%'],
  370. content: "/admin/recharge/list?UserID=" + GameID + "&recharge_type=1&isEmpty=2",
  371. })
  372. }
  373. }
  374. function Cash(type, GameID) {
  375. if (type == 1) {
  376. var page = layer.open({
  377. type: 2,
  378. title: '{{ __('auto.总茶叶') }}',
  379. shadeClose: true,
  380. offset: 't',
  381. shade: 0.8,
  382. area: ['70%', '80%'],
  383. content: "/admin/withdrawal/list?GameID=" + GameID + "&state=2&isEmpty=1",
  384. })
  385. } else {
  386. var page = layer.open({
  387. type: 2,
  388. title: '{{ __('auto.今日茶叶') }}',
  389. shadeClose: true,
  390. offset: 't',
  391. shade: 0.8,
  392. area: ['70%', '80%'],
  393. content: "/admin/withdrawal/list?GameID=" + GameID + "&state=2&isEmpty=2",
  394. })
  395. }
  396. }
  397. function logonIp(IP) {
  398. var page = layer.open({
  399. type: 2,
  400. title: '{{ __('auto.关联登录') }}IP',
  401. shadeClose: true,
  402. offset: 't',
  403. shade: 0.8,
  404. area: ['70%', '80%'],
  405. content: "/admin/global/join?id=4&LastLogonIP=" + IP,
  406. })
  407. }
  408. function dk_refresh() {
  409. $.ajax({
  410. type: "post",
  411. url: "/admin/global/dk_userlist",
  412. headers: {
  413. 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
  414. },
  415. data: that.data_obj,
  416. success: function (msg) {
  417. if (msg) {
  418. $(".main-panel").html(msg)
  419. }
  420. }
  421. })
  422. }
  423. function onlcick_hidden1(val, obj) {
  424. obj.style.display = "none";
  425. console.log(val)
  426. var aDiv = document.getElementsByClassName("hidden_td" + val);
  427. for (var i = 0; i < aDiv.length; i++) {
  428. //遍历 aDiv的中所有元素并且将所有class为“test”的元素的字体颜色设置为“red”
  429. aDiv[i].style.display = "none";
  430. }
  431. ;
  432. }
  433. function show_control_log(id) {
  434. var page = layer.open({
  435. type: 2,
  436. title: '{{ __('auto.单控记录') }}',
  437. shadeClose: true,
  438. shade: 0.8,
  439. area: ['60%', '70%'],
  440. content: '/admin/control/show_control_log/' + id,
  441. });
  442. }
  443. function update_label(id) {
  444. var page = layer.open({
  445. type: 2,
  446. title: '{{ __('auto.修改标签') }}',
  447. shadeClose: true,
  448. shade: 0.8,
  449. area: ['40%', '70%'],
  450. content: '/admin/global/update_label/' + id,
  451. end: function (layero, index) {
  452. window.location.href = "/admin/global/dk_userlist?GameID={{$GameID}}&Channel={{$Channel}}&UserScoreControl={{$UserScoreControl}}&SpreaderID={{$SpreaderID}}&label={{$user_label}}&NickName={{$NickName}}&game_room={{$game_room}}&is_line={{$is_line}}&start_time={{$start_time}}&end_time={{$end_time}}&ChangeScore={{$ChangeScoreSort}}&sort_tx={{$sort_tx}}&sort_date={{$sort_date}}&label_sort={{$label_sort}}&amount={{$amountSort}}&Score={{$ScoreSort}}&page={{$page}}";
  453. $.ajax({
  454. type: "post",
  455. url: "/admin/global/dk_userlist",
  456. headers: {
  457. 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
  458. },
  459. data: that.data_obj,
  460. success: function (msg) {
  461. if (msg) {
  462. $(".main-panel").html(msg)
  463. }
  464. }
  465. })
  466. },
  467. });
  468. }
  469. function remarks(obj, id) {
  470. remark = $(obj).html();
  471. myRequest("/admin/global/remarks/" + id, "post", {remark}, function (res) {
  472. layer.msg(res.msg)
  473. });
  474. }
  475. function start_times() {
  476. getFormat('00', '00', '00');
  477. document.getElementById("start_time").value = format
  478. }
  479. function end_times() {
  480. getFormat('23', '59', '59');
  481. document.getElementById("end_time").value = format
  482. }
  483. function refreshArea(_formWin){
  484. var _formWinObj = $("#layui-layer"+_formWin);
  485. var w = _formWinObj.outerWidth();
  486. var h = _formWinObj.outerHeight();
  487. var l = ($(document).width()-w)/2.5;
  488. var t = ($(window).height()-h)/2;
  489. _formWinObj.css({
  490. "left":l,
  491. "top":t
  492. });
  493. }
  494. function update(id) {
  495. var page = layer.open({
  496. type: 2,
  497. title: '{{ __('auto.修改配置') }}',
  498. shadeClose: true,
  499. shade: 0.8,
  500. offset:'180px',
  501. scrollbar: false,
  502. maxmin: true, //开启最大化最小化按钮
  503. area: ['70%', '60%'],
  504. fixed:false,
  505. content: '/admin/global/dk_userlist_edit?UserID=' + id,
  506. end: function (layero, index) {
  507. $.ajax({
  508. type: "post",
  509. url: "/admin/global/dk_userlist",
  510. headers: {
  511. 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
  512. },
  513. data: that.data_obj,
  514. success: function (msg) {
  515. if (msg) {
  516. $(".main-panel").html(msg)
  517. }
  518. }
  519. })
  520. },
  521. });
  522. }
  523. function del(id) {
  524. myConfirm("{{ __('auto.删除操作不可逆,是否继续') }}?", function () {
  525. myRequest("/admin/accusation/del/" + id, "post", {}, function (res) {
  526. layer.msg(res.msg)
  527. setTimeout(function () {
  528. window.location.href = "/admin/global/dk_userlist?GameID={{$GameID}}&Channel={{$Channel}}&UserScoreControl={{$UserScoreControl}}&SpreaderID={{$SpreaderID}}&label={{$user_label}}&label_sort={{$label_sort}}&NickName={{$NickName}}&game_room={{$game_room}}&is_line={{$is_line}}&start_time={{$start_time}}&end_time={{$end_time}}&ChangeScore={{$ChangeScoreSort}}&sort_tx={{$sort_tx}}&sort_date={{$sort_date}}&amount={{$amountSort}}&Score={{$ScoreSort}}&page={{$page}}";
  529. }, 1500)
  530. });
  531. });
  532. }
  533. function checkbox() {
  534. var num = document.getElementsByName('checkbox');
  535. for (var i = 0; i < num.length; i++) {
  536. if (num[i].checked) {
  537. num[i].checked = false;
  538. } else {
  539. num[i].checked = true;
  540. }
  541. }
  542. }
  543. function ban(ban) {
  544. //1封号 2解封
  545. var num = document.getElementsByName('checkbox');
  546. var str = '';
  547. for (var i = 0; i < num.length; i++) {
  548. if (num[i].checked) {
  549. str = str + num[i].id + ',';
  550. }
  551. }
  552. if (str == '') {
  553. alert('{{ __('auto.请选择要操作的数据') }}');
  554. return false;
  555. }
  556. var id = str.substr(0, str.length - 1);
  557. myConfirm("{{ __('auto.是否继续账户操作') }}?", function () {
  558. myRequest("/admin/global/ban", "post", {id: id, ban: ban}, function (res) {
  559. layer.msg(res.msg)
  560. setTimeout(function () {
  561. window.location.reload();
  562. }, 1500)
  563. });
  564. });
  565. return false;
  566. }
  567. var that = this
  568. function userLabel(obj, val) {
  569. if (val == 'asc') {
  570. $(".user_label svg:eq(1)").children('path').attr('fill', '#707071');
  571. $(obj).children('path').attr('fill', 'red')
  572. } else {
  573. $(obj).children('path').attr('fill', 'red')
  574. $(".user_label svg:eq(0)").children('path').attr('fill', '#707071');
  575. }
  576. that.data_obj.label_sort = val
  577. that.data_obj.ServerNameSort = null
  578. that.data_obj.Score = null
  579. that.data_obj.ChangeScore = null
  580. that.data_obj.amount = null
  581. that.data_obj.sort_tx = null
  582. that.data_obj.sort_date = null
  583. $.ajax({
  584. type: "post",
  585. url: "/admin/global/dk_userlist",
  586. headers: {
  587. 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
  588. },
  589. data: that.data_obj,
  590. success: function (msg) {
  591. if (msg) {
  592. $(".main-panel").html(msg)
  593. }
  594. }
  595. })
  596. }
  597. function ServerNameSort(obj, val) {
  598. if (val == 'asc') {
  599. $(".ServerNameSort svg:eq(1)").children('path').attr('fill', '#707071');
  600. $(obj).children('path').attr('fill', 'red')
  601. } else {
  602. $(obj).children('path').attr('fill', 'red')
  603. $(".ServerNameSort svg:eq(0)").children('path').attr('fill', '#707071');
  604. }
  605. that.data_obj.label_sort = null
  606. that.data_obj.ServerNameSort = val
  607. that.data_obj.Score = null
  608. that.data_obj.ChangeScore = null
  609. that.data_obj.amount = null
  610. that.data_obj.sort_tx = null
  611. that.data_obj.sort_date = null
  612. $.ajax({
  613. type: "post",
  614. url: "/admin/global/dk_userlist",
  615. headers: {
  616. 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
  617. },
  618. data: that.data_obj,
  619. success: function (msg) {
  620. if (msg) {
  621. $(".main-panel").html(msg)
  622. }
  623. }
  624. })
  625. }
  626. function sort_money_func(obj, val) {
  627. if (val == 'asc') {
  628. $(".sort_money svg:eq(1)").children('path').attr('fill', '#707071');
  629. $(obj).children('path').attr('fill', 'red')
  630. } else {
  631. $(obj).children('path').attr('fill', 'red')
  632. $(".sort_money svg:eq(0)").children('path').attr('fill', '#707071');
  633. }
  634. that.data_obj.label_sort = null
  635. that.data_obj.ServerNameSort = null
  636. that.data_obj.Score = val
  637. that.data_obj.ChangeScore = null
  638. that.data_obj.amount = null
  639. that.data_obj.sort_tx = null
  640. that.data_obj.sort_date = null
  641. $.ajax({
  642. type: "post",
  643. url: "/admin/global/dk_userlist",
  644. headers: {
  645. 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
  646. },
  647. data: that.data_obj,
  648. success: function (msg) {
  649. if (msg) {
  650. $(".main-panel").html(msg)
  651. }
  652. }
  653. })
  654. }
  655. function ChangeScore_func(obj, val) {
  656. if (val == 'asc') {
  657. $(".ChangeScore svg:eq(1)").children('path').attr('fill', '#707071');
  658. $(obj).children('path').attr('fill', 'red')
  659. } else {
  660. $(obj).children('path').attr('fill', 'red')
  661. $(".ChangeScore svg:eq(0)").children('path').attr('fill', '#707071');
  662. }
  663. that.data_obj.label_sort = null
  664. that.data_obj.ServerNameSort = null
  665. that.data_obj.Score = null
  666. that.data_obj.ChangeScore = val
  667. that.data_obj.amount = null
  668. that.data_obj.sort_tx = null
  669. that.data_obj.sort_date = null
  670. $.ajax({
  671. type: "post",
  672. url: "/admin/global/dk_userlist",
  673. headers: {
  674. 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
  675. },
  676. data: that.data_obj,
  677. success: function (msg) {
  678. if (msg) {
  679. $(".main-panel").html(msg)
  680. }
  681. }
  682. })
  683. }
  684. function sort_cz_func(obj, val) {
  685. if (val == 'asc') {
  686. $(".sort_cz svg:eq(1)").children('path').attr('fill', '#707071');
  687. $(obj).children('path').attr('fill', 'red')
  688. } else {
  689. $(obj).children('path').attr('fill', 'red')
  690. $(".sort_cz svg:eq(0)").children('path').attr('fill', '#707071');
  691. }
  692. that.data_obj.label_sort = null
  693. that.data_obj.ServerNameSort = null
  694. that.data_obj.Score = null
  695. that.data_obj.ChangeScore = null
  696. that.data_obj.amount = val
  697. that.data_obj.sort_tx = null
  698. that.data_obj.sort_date = null
  699. $.ajax({
  700. type: "post",
  701. url: "/admin/global/dk_userlist",
  702. headers: {
  703. 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
  704. },
  705. data: that.data_obj,
  706. success: function (msg) {
  707. if (msg) {
  708. $(".main-panel").html(msg)
  709. }
  710. }
  711. })
  712. }
  713. function sort_tx_func(obj, val) {
  714. if (val == 'asc') {
  715. $(obj).children('path').attr('fill', 'red')
  716. $(".sort_tx svg:eq(1)").children('path').attr('fill', '#707071');
  717. } else {
  718. $(".sort_tx svg:eq(0)").children('path').attr('fill', '#707071');
  719. $(obj).children('path').attr('fill', 'red')
  720. }
  721. that.data_obj.label_sort = null
  722. that.data_obj.ServerNameSort = null
  723. that.data_obj.Score = null
  724. that.data_obj.ChangeScore = null
  725. that.data_obj.amount = null
  726. that.data_obj.sort_tx = val
  727. that.data_obj.sort_date = null
  728. $.ajax({
  729. type: "post",
  730. url: "/admin/global/dk_userlist",
  731. headers: {
  732. 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
  733. },
  734. data: that.data_obj,
  735. success: function (msg) {
  736. if (msg) {
  737. $(".main-panel").html(msg)
  738. }
  739. }
  740. })
  741. }
  742. function sort_date_func(obj, val) {
  743. if (val == 'asc') {
  744. $(obj).children('path').attr('fill', 'red')
  745. $(".sort_date svg:eq(1)").children('path').attr('fill', '#707071');
  746. } else {
  747. $(".sort_date svg:eq(0)").children('path').attr('fill', '#707071');
  748. $(obj).children('path').attr('fill', 'red')
  749. }
  750. that.data_obj.label_sort = null
  751. that.data_obj.ServerNameSort = null
  752. that.data_obj.Score = null
  753. that.data_obj.ChangeScore = null
  754. that.data_obj.amount = null
  755. that.data_obj.sort_tx = null
  756. that.data_obj.sort_date = val
  757. $.ajax({
  758. type: "post",
  759. url: "/admin/global/dk_userlist",
  760. headers: {
  761. 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
  762. },
  763. data: that.data_obj,
  764. success: function (msg) {
  765. if (msg) {
  766. $(".main-panel").html(msg)
  767. }
  768. }
  769. })
  770. }
  771. </script>
  772. @endsection