<!DOCTYPE html>
<html lang="en">

<body>
<div class="content_wrapper">
    <div class="container-fluid ">
        <div class="row">
            <div class="col-sm-12">
                <aside>
                    <header><i class="fa fa-fw fa-file"></i>副老虎机/奖励倍率配置</header>
                    <section>
                        <div class="container-fluid">
                            <div class="container-fluid">
                                <div class="row">
                                    <div class="col-sm-12">
                                        <button type="button" class="btn btn-success" onclick="summitBasicConf()">提交</button>
                                    </div>
                                </div>
                            </div>
                            <hr>

                            <div class="ibox-content">
                                <div class="col-sm-10">
                                    <form class="form-horizontal" method="post" id="commonConfForm" action="">
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label">3个能量：</label>
                                            <div class="col-sm-2">
                                                <input type="number" placeholder="3个能量" name="threeEnergy" value="<?php echo $threeEnergy; ?>"
                                                       class="form-control">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label">1个WILD倍率：</label>
                                            <div class="col-sm-2">
                                                <input type="number" placeholder="1个WILD倍率" name="oneWild" value="<?php echo $oneWild; ?>"
                                                       class="form-control">
                                            </div>

                                            <label class="col-sm-2 control-label">2个WILD倍率：</label>
                                            <div class="col-sm-2">
                                                <input type="number" placeholder="2个WILD倍率" name="twoWild" value="<?php echo $twoWild; ?>"
                                                       class="form-control">
                                            </div>

                                            <label class="col-sm-2 control-label">3个WILD倍率：</label>
                                            <div class="col-sm-2">
                                                <input type="number" placeholder="3个WILD倍率" name="threeWild" value="<?php echo $threeWild; ?>"
                                                       class="form-control">
                                            </div>
                                        </div>

                                        <div class="form-group">
                                            <label class="col-sm-2 control-label">1个JACKPOT倍率：</label>
                                            <div class="col-sm-2">
                                                <input type="number" placeholder="1个JACKPOT倍率" name="oneJackpot" value="<?php echo $oneJackpot; ?>"
                                                       class="form-control">
                                            </div>

                                            <label class="col-sm-2 control-label">2个JACKPOT倍率：</label>
                                            <div class="col-sm-2">
                                                <input type="number" placeholder="2个JACKPOT倍率" name="twoJackpot" value="<?php echo $twoJackpot; ?>"
                                                       class="form-control">
                                            </div>

                                            <label class="col-sm-2 control-label">3个JACKPOT倍率：</label>
                                            <div class="col-sm-2">
                                                <input type="number" placeholder="3个JACKPOT倍率" name="threeJackpot" value="<?php echo $threeJackpot; ?>"
                                                       class="form-control">
                                            </div>
                                        </div>
                                    </form>
                                </div>
                            </div>
                        </div>
                    </section>
                </aside>
            </div>
        </div>
    </div>
</div>
</body>

<script>
    function summitBasicConf() {
        const data = new FormData(document.getElementById("commonConfForm"));

        $.ajax({
            url: rootPath + 'assistantSlots/updateRewardRateConf',
            type: 'POST',
            data: data,
            dataType: 'json',
            contentType: false, //必须
            processData: false, //必须
            success: function (data) {
                alert(data.msg);
                // confirm(data.msg);
                window.location.reload();
            },
            error: function (data) {
                alert(data.msg);
            }
        });
    }
</script>
