index.blade.php 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. @extends('vip.layouts')
  2. @section('seo_title')
  3. 游戏设置
  4. @endsection
  5. @section('content')
  6. <style>
  7. .layui-laydate-range {
  8. width: auto;
  9. }
  10. </style>
  11. <script type="text/html" id="agent_is_water">
  12. <input type="checkbox" style="width: 60px;" name="agent_is_water" value="@{{d.id}}" lay-skin="switch" lay-text="是|否" lay-filter="openStatus" @{{ d.agent_is_water == '1' ? 'checked' : '' }}>
  13. </script>
  14. <!---注单管理-->
  15. @push('dataTableJS')
  16. // var active = {
  17. // reload: function(){
  18. // //执行重载
  19. // table.reload('{{ $dataId }}', {
  20. // page: {
  21. // curr: 1 //重新从第 1 页开始
  22. // }
  23. // ,where: {
  24. // name:$('#name').val(),
  25. // }
  26. // });
  27. // }
  28. // };
  29. // $('.lay-btn-diy').on('click', function(){
  30. // var type = $(this).data('type');
  31. // active[type] ? active[type].call(this) : '';
  32. // });
  33. //重置表单
  34. $('.reset').on('click',function(){
  35. $('input').val('');
  36. $('#name').val('');
  37. // var type = $(this).data('type');
  38. // active[type] ? active[type].call(this) : '';
  39. });
  40. //刷新表单
  41. $('.set').on('click',function(){
  42. });
  43. form.on('switch(openStatus)', function(obj){
  44. var agent_is_water = 1;
  45. if(obj.elem.checked==true){
  46. agent_is_water =1;
  47. }else{
  48. agent_is_water =2;
  49. }
  50. setcolumn('/admin/NagentWater/Watershow',this.name,agent_is_water,this.value,obj);
  51. //layer.tips(msg, obj.othis);
  52. });
  53. function setcolumn(url,column,value,id,obj){
  54. $.ajax({
  55. url: url+'?'+column+'='+value+'&id='+id,
  56. dataType: 'json',
  57. type: 'get',
  58. success:function(data){
  59. layer.msg(data.msg);
  60. if(value==2){
  61. obj.othis[0].setAttribute("class", "layui-unselect layui-form-switch");
  62. obj.othis[0].innerHTML='<em>否</em><i></i>';
  63. }else{
  64. obj.othis[0].setAttribute("class",'layui-unselect layui-form-switch layui-form-onswitch');
  65. obj.othis[0].innerHTML='<em>是</em><i></i>';
  66. }
  67. }
  68. });
  69. }
  70. @endpush
  71. @include('vip.datatable')
  72. @endsection