<link rel="stylesheet" href="<?php echo base_url();?>public/js/date/datedropper.min.css">
<script src="<?php echo base_url();?>public/js/date/datedropper.min.js"></script>

<!-- Select2 -->
<link rel="stylesheet" href="<?php echo base_url();?>public/js/vendor/select2/select2.min.css">
<script src="<?php echo base_url();?>public/js/vendor/select2/select2.full.min.js"></script>

<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="row">
                            <div class="col-sm-12">
                                <form class="form-inline">
                                    <span class="gap"></span>
                                    <div class="form-group">
                                        <label>玩家id：</label>
                                        <input type="text" class="form-control" placeholder="用户UID" name="userid" id="userid" value="<?php echo $uid ?? '';?>">
                                    </div>
                                    <button type="button" class="btn btn-primary" id="SubmitBtn">查询</button>
                                </form>
                            </div>
                        </div>
                        <br>

                        <div class="container-fluid">
                            <div class="row">
                                <div class="col-sm-12">
                                    <div class="table-responsive">
                                        <table class="table table-striped table-bordered table-hover"  width="100%" style="word-break:break-all; word-wrap:break-word; ">
                                            <thead>
                                            <tr>
                                                <th>说明</th>
                                                <th>内容</th>
                                            </tr>
                                            </thead>
                                            <tbody>
                                            <?php
                                            echo "<tr><td>当前活动ID</td><td>{$userActInfo['aid']}</td></tr>";
                                            echo "<tr><td>当前活动分组</td><td>{$userActInfo['group']}</td></tr>";
                                            echo "<tr><td>绑定活动时属性</td><td>{$userActInfo['attrInfo']}</td></tr>";
                                            echo "<tr><td>当前积分</td><td>{$userActInfo['score']}</td></tr>";
                                            ?>
                                            </tbody>
                                        </table>
                                    </div>
                                </div>
                            </div>
                        </div>


                        <div class="container-fluid">
                            <div class="row">

                                <div class="col-sm-12">
                                    <div class="table-responsive">
                                        <table class="table table-striped table-bordered table-hover"  width="100%" style="word-break:break-all; word-wrap:break-word; ">
                                            <thead>
                                            <tr>
                                                <th>阶段</th>
                                                <th>领奖时间</th>
                                            </tr>
                                            </thead>
                                            <tbody>
                                            <?php
                                            foreach ($list as $k=> $item){
                                                echo "<tr>";
                                                echo "<td>{$k}</td><td>".date("Y-m-d H:i:s",$item)."</td>";
                                                echo "</tr>";
                                            }
                                            ?>
                                            </tbody>
                                        </table>
                                    </div>
                                </div>

                            </div>
                        </div>

                    </section>
                </aside>
            </div>
        </div>
    </div>
</div>
<script>


    $('#SubmitBtn').click(function(){
        var userId = $('#userid').val();
        var url = rootPath+"#customer/userActSpinsMaster/"+userId;
        window.location.href = url
    });

</script>