betMoney.blade.php 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>layui</title>
  6. <meta name="csrf-token" content="<?php echo e(csrf_token()); ?>">
  7. <meta name="renderer" content="webkit">
  8. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  9. <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  10. <link rel="stylesheet" href="<?php echo e(URL::asset('admin/frame/layui/css/layui.css')); ?>" media="all">
  11. <link rel="stylesheet" href="<?php echo e(URL::asset('admin/css/welcome.css')); ?>" media="all">
  12. <!-- 注意:如果你直接复制所有代码到本地,上述css路径需要改成你本地的 -->
  13. </head>
  14. <body>
  15. <!--<div class="layui-btn-group demoTable">
  16. <button class="layui-btn" data-type="getCheckData">获取选中行数据</button>
  17. <button class="layui-btn" data-type="getCheckLength">获取选中数目</button>
  18. <button class="layui-btn" data-type="isAll">验证是否全选</button>
  19. </div>-->
  20. <table class="layui-hide" id="LAY_table_user" lay-filter="demo"></table>
  21. <div class="layui-btn-group demoTable">
  22. <button class="layui-btn layui-btn-small" data-type="getCheckData">保存</button>
  23. </div>
  24. <script src="<?php echo e(URL::asset('admin/js/jquery-1.11.3.js')); ?>" charset="utf-8"></script>
  25. <script src="<?php echo e(URL::asset('admin/frame/layui/layui.js')); ?>" charset="utf-8"></script>
  26. <script src="<?php echo e(URL::asset('admin/js/configure.js')); ?>" charset="utf-8"></script>
  27. <script>
  28. var url2 = '/admin/game/BetMoney';
  29. var url1 = '<?php echo e(URL::asset("admin/json/package.json")); ?>';
  30. layui.use(['laydate', 'laypage', 'layer', 'table'], function () {
  31. var laydate = layui.laydate //日期
  32. , laypage = layui.laypage //分页
  33. , laytpl = layui.laytpl;
  34. layer = layui.layer //弹层
  35. , table = layui.table //表格
  36. , form = layui.form;
  37. //获取表头
  38. var thead = type(1);
  39. //获取数据
  40. var returnData = getData(url2, {status: 1});
  41. //执行一个 table 实例
  42. table.render({
  43. elem: '#LAY_table_user'
  44. , even: true
  45. , id: 'tab'
  46. , cols: [[ //表头
  47. {field: 'id', title: 'ID', width: 100}
  48. , {field: 'name', title: '游戏', width: 100}
  49. , {field: 'big_money', title: '最大投注金额', width: 200, edit: 'text'}
  50. , {field: 'small_money', title: '最小投注金额', width: 200, edit: 'text'}
  51. , {field: 'commission_money', title: '反水金额', width: 120, edit: 'text'}
  52. , {field: 'commission_rate', title: '返水倍率', width: 120, edit: 'text'}
  53. ]]
  54. , data: returnData.data
  55. //, page: true //是否显示分页
  56. });
  57. var $ = layui.$, active = {
  58. getCheckData: function (json) { //获取选中数据
  59. var checkStatus = table.checkStatus('tab')
  60. , data = table.data;
  61. }
  62. };
  63. $('.demoTable .layui-btn').on('click', function () {
  64. var type = $(this).data('type');
  65. active[type] ? active[type].call(this) : '';
  66. });
  67. });
  68. </script>
  69. </body>
  70. </html>