@extends('vip.layouts')
@section('content')
<style type="text/css">
  .loss-input {
    /* display: block; */
    width: 100%;
    padding-left: 10px;
}
.loss-input {
    height: 38px;
    line-height: 1.3;
    line-height: 38px\9;
    border-width: 1px;
    border-style: solid;
    background-color: #fff;
    border-radius: 2px;
}
</style>
<form class="layui-form" action="{{ url()->full() }}" id="submitForm" name="submitForm" method="post" eventType=eventAjaxForm>
{!! csrf_field() !!}


            <div class="layui-form-item">
                <label class="layui-form-label">{{ trans('oggame.game_zh') }}:</label>
                <div class="layui-input-block">
                <input type="text" name="game_zh"   id="game_zh"  required  lay-verify="" placeholder="" autocomplete="off" value="@isset($data) {{ $data['game_zh'] }} @endisset" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">{{ trans('oggame.game_type') }}:</label>
                <div class="layui-input-block">
                <input type="text" name="game_type"   id="game_type"  required  lay-verify="" placeholder="" autocomplete="off" value="@isset($data) {{ $data['game_type'] }} @endisset" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">{{ trans('oggame.game_quota') }}:</label>
                <div class="layui-input-block">
                <input type="text" name="game_quota"   id="game_quota"  required  lay-verify="" placeholder="" autocomplete="off" value="@isset($data) {{ $data['game_quota'] }} @endisset" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">{{ trans('oggame.agent_name') }}:</label>
                <div class="layui-input-block">
                <input type="text" name="agent_name"   id="agent_name"  required  lay-verify="" placeholder="" autocomplete="off" value="@isset($data) {{ $data['agent_name'] }} @endisset" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">{{ trans('oggame.agent_pwd') }}:</label>
                <div class="layui-input-block">
                <input type="text" name="agent_pwd"   id="agent_pwd"  required  lay-verify="" placeholder="" autocomplete="off" value="@isset($data) {{ $data['agent_pwd'] }} @endisset" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">{{ trans('oggame.agent_money') }}:</label>
                <div class="layui-input-block">
                <input type="text" name="agent_money"   id="agent_money"  required  lay-verify="" placeholder="" autocomplete="off" value="@isset($data) {{ $data['agent_money'] }} @endisset" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">{{ trans('oggame.agent_url') }}:</label>
                <div class="layui-input-block">
                <input type="text" name="agent_url"   id="agent_url" placeholder="" autocomplete="off" value="@isset($data) {{ $data['agent_url'] }} @endisset" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">{{ trans('oggame.user_prefix') }}:</label>
                <div class="layui-input-block">
                <input type="text" name="user_prefix"   id="user_prefix"  required  lay-verify="" placeholder="" autocomplete="off" value="@isset($data) {{ $data['user_prefix'] }} @endisset" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">{{ trans('oggame.extend') }}:</label>
                <div class="layui-input-block">
                <textarea class="layui-input" rows="6" name="extend"   id="extend"  required  lay-verify="" placeholder="" autocomplete="off" style="height: auto;">@isset($data) {{ $data['extend'] }} @endisset</textarea>
                </div>
                <div style="font-size: 16px;color: red; margin-left: 110px;line-height: 38px;">提示：必须json格式{}</div>
            </div>


@if(S('ACTION')!='view')
  <div class="layui-form-item">
    <div class="layui-input-block">
      <button class="layui-btn" lay-submit lay-filter="submitForm">立即提交</button>
      <button type="reset" class="layui-btn layui-btn-green">重置</button>
    </div>
  </div>
@endif
</form>

<script>
      //Demo
      layui.use(['form'], function(){
          var form = layui.form;

          //监听提交
          form.on('submit(submitForm)', function(data){
              return true;
          });
      });
      function cbFormSuccess(data){
          layer.msg(data.msg);
          setTimeout(function(){
              window.location.href='/Admin/Rgame/egameset';
          },2500);
      }
  </script>
@endsection
