<title>体力瓶配置</title>
<link rel="stylesheet" href="<?php echo base_url();?>public/css/vendor/bootstrap/bootstrap-table.css">
<link rel="stylesheet" href="<?php echo base_url();?>public/css/vendor/bootstrap/table-fix-column.css">

<script src="<?php echo base_url();?>public/js/vendor/bootstrap/src/bootstrap-table.js"></script>
<script src="<?php echo base_url();?>public/js/vendor/bootstrap/src/table-fix-column.js"></script>

<!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
<link rel="stylesheet" href="<?php echo base_url();?>public/js/bootstrap/bootstrap.min.css" >
<link rel="stylesheet" href="<?php echo base_url();?>public/js/vendor/bootstrap-datepicker/css/bootstrap-datepicker.standalone.min.css">
<link rel="stylesheet" href="<?php echo base_url();?>public/css/jquery.timepicker.min.css">
<!-- Select2 -->
<link rel="stylesheet" href="<?php echo base_url();?>public/js/vendor/select2/select2.min.css">


<style type="text/css">
    table {
        table-layout:fixed !important;
    }

    th{
        background: rgb(146, 208, 80);
    }

    td,th{
        max-width: 400px;
        word-wrap: break-word;
    }

    .table-hover > tbody > tr:hover {
        background-color: #c8bd6d;
    }

    input {
        width:60px;
    }

    #roleTable tr:nth-child(5n){
        background:rgb(198, 239, 206);
    } /**隔五行*/

    .fixed-table-toolbar {
        display: none;
    }

    .fileinput-button {
        position: relative;
        top: -5px;
    }

    .fileinput-button input{
        position:absolute;
        right: 0px;
        top: 0px;
        opacity: 0;
        -ms-filter: 'alpha(opacity=0)';
    }
</style>
<div class="content_wrapper">
    <div id="msg-tip"></div>
    <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">
                            <button type="button" class="btn btn-success" id="submitBtn">提交</button>
                            <div class="row">
                                <form action="" >
                                <div class="form-group" >
                                    <label class="col-sm-1 control-label">默认推好友上限次数</label>
                                    <div class="col-sm-1">
                                        <input type="text" class="form-control"  name="conf[rand_friend_limit]" value="<?php echo $baseCfg['rand_friend_limit'];?>">
                                    </div>
                                    <label class="col-sm-1 control-label">打好友权重</label>
                                    <div class="col-sm-1">
                                        <input type="text" class="form-control"  name="conf[friend_weight]" value="<?php echo $baseCfg['friend_weight'];?>">
                                    </div>
                                    <label class="col-sm-1 control-label">打好友增长权重</label>
                                    <div class="col-sm-1">
                                        <input type="text" class="form-control"  name="conf[grow_weight]" value="<?php echo $baseCfg['grow_weight'];?>">
                                    </div>
                                </div>
                                </form>
                            </div>
                        </div>
                    </section>
                </aside>
            </div>
        </div>
    </div>
</div>




<script src="<?php echo base_url();?>public/js/common.js"></script>
<!--<script src="--><?php //echo base_url();?><!--public/js/imageChange.js"></script>-->

<script>
    //提交表格数据
    $('#submitBtn').click(function () {
        // var dataType = $(this).parent().find('form').attr('dataType');
        var datas = $(this).parent().find('form').serializeArray();
        // console.log(datas);
        $.ajax({
            type: 'POST',
            dataType: 'json',
            data:datas,
            url:'config/saveAttackCfg',
            success: function(data){
                // console.log(data);
                if(data.ret == 1){
                    alert(data.msg);
                    window.location.reload()
                }else{
                    msgTip.messager().error(data.msg);
                }
            }
        });
    });
</script>



