<?php if (!defined('THINK_PATH')) exit(); /*a:1:{s:63:"D:\wwwroot\pay.6gym.com\public/../app/index\view\index\pays.html";i:1610466432;}*/ ?>
<?php if($pay_Set == '1'): ?>
<form id="PayForm"  lay-filter="PayForm" class="layui-form model-form no-padding">
    
        <div class="model-form-body" style="max-height: 330px;">
            <div class="layui-form-item">
                <label class="layui-form-label">充值商户:</label>
                <div class="layui-input-block">
                    <input name="name" value="<?php echo $name; ?>" placeholder="商户用户名" class="layui-input"
                           lay-verify="required" required disabled/>
                </div>
            </div> 
            <div class="layui-form-item">
                <label class="layui-form-label layui-form-required">充值金额:</label>
                <div class="layui-input-block" >
                      <input name="money" value="100" placeholder="请输入充值金额" class="layui-input"
                           lay-verify="required|numberX" required/>
                        
                </div>
            </div>
            
            <div class="layui-form-item">
                <label class="layui-form-label layui-form-required">充值方式:</label>
                <div class="layui-input-block" >
                       <input type="radio" name="type" value="1" title="支付宝" checked>
                </div>
            </div>
            
			
        </div>
        <div class="layui-form-item text-right model-form-footer">
            <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">取消充值</button>
            <button class="layui-btn"  lay-filter="PaySubmit" lay-submit>确认充值</button>
        </div>
    </form>
   
    <script>
       layui.use(['layer', 'form', 'admin', 'formX'], function () {
           
        var $ = layui.jquery;
        var layer = layui.layer;
        var form = layui.form;
        var admin = layui.admin;   
        var formX = layui.formX;
        
        
        form.render(null, 'PayForm');
        form.on('submit(PaySubmit)', function (data) {
			var loadIndex = layer.load(2);
                $.post('<?php echo url("index/pays"); ?>', data.field, function (res) {
                    layer.close(loadIndex);
                    if (res.code==1) {                                
                        layer.msg(res.msg);
                    } else {
                        layer.msg(res.msg, {icon: 2});
                    }
                },  'json');
                admin.closeDialog('[lay-filter="PaySubmit"]');
                return false;
               });
       });
	</script>	
<?php else: ?>
<form id="PayForm"  lay-filter="PayForm" class="layui-form model-form no-padding">
    
        <div class="model-form-body" style="max-height: 330px;padding-left: 30px;">
          <?php echo $pay_msg; ?>
            
			
        </div>
        <div class="layui-form-item text-right model-form-footer">
            <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">取消充值</button>
      
        </div>
    </form>
<?php endif; ?>