<link href="<?php echo base_url();?>public/h5/css/bootstrap.min14ed.css" rel="stylesheet">
<link href="<?php echo base_url();?>public/h5/css/font-awesome.min93e3.css" rel="stylesheet">
<link href="<?php echo base_url();?>public/h5/css/animate.min.css" rel="stylesheet">
<link href="<?php echo base_url();?>public/h5/css/style.min862f.css" rel="stylesheet">
<style>
    #alertmod_activity_list {
        top: 900px !important;
        display: none;
    }
    #alertmod_table_list_2 {
        top: 900px !important;
        display: none;
    }
    .my-fcheck {
        position: absolute;
        top: 0%; left: 0%;
        display: block;
        width: 100%;
        height: 100%;
        margin: 0px;
        padding: 0px;
        background: rgb(255, 255, 255);
        border: 0px;
        opacity: 0;
    }
    .noshow{
        display: none;
    }
    .rewardsWrap{
        padding: 5px;
        border: 1px solid;
        margin: 5px;
    }
</style>

<div class="container-fluid" style="background-color: #f3f3f4;">
    <div class="row">
        <div class="ibox float-e-margins">
            <div class="ibox-title">
                <h5>运营后台/活动配置</h5>
            </div>
            <div class="ibox-content">
                <h3 style="font-weight: bold">活动配置</h3>
            </div>
        </div>
    </div>

</div>
<div class="row">
    <div class="col-sm-12">
        <div class="tabs-container">
            <ul class="nav nav-tabs">
                <li class="active"><a data-toggle="tab" href="#tab-1" aria-expanded="true"><?php echo $info['name'];?>配置</a></li>
            </ul>
            <div class="tab-content">
                <div id="tab-1" class="tab-pane active">
                    <div class="panel-body">

                        <form method="post" class="form-horizontal" id="activityFrom" enctype="multipart/form-data" action="#">
                            <input type="hidden" value="<?php echo $id?>" name="id">
                            <div class="ibox float-e-margins">
                                <div class="ibox-title" style="border-top: 0;">
                                    <h3 style="font-weight: bold">活动类型配置</h3>
                                </div>
                                <div class="ibox-content" style="padding:25px 0;">
                                    <div class="col-sm-8">
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label">活动名称:</label>
                                            <div class="col-sm-4">
                                                <input type="text" placeholder="中文" name="name" value="<?php echo $info['name'];?>" class="form-control">
                                            </div>
                                        </div>

                                        <div class="form-group "  style="display: none">
                                            <label class="col-sm-2 control-label m-b">A/B类型：</label>
                                            <div class="col-sm-4">
                                                <select class="form-control m-b" name="abType">
                                                    <option value="0" <?php if($info['abType'] == 0) echo 'selected';?>>关闭</option>
                                                    <option value="1" <?php if($info['abType'] == 1) echo 'selected';?>>firebase分组</option>
                                                    <option value="2" <?php if($info['abType'] == 2) echo 'selected';?>>数数分群</option>
                                                </select>
                                            </div>
                                            <label class="col-sm-2 control-label m-b">A/B 组：</label>
                                            <div class="col-sm-4">
                                                <select class="form-control m-b" name="abTest">
                                                    <?php if($info['abType'] != 2){?>
                                                        <option value="0" <?php if($info['abTest'] == 0) echo 'selected';?>>关闭</option>
                                                        <option value="1" <?php if($info['abTest'] == 1) echo 'selected';?>>基准组</option>
                                                        <option value="2" <?php if($info['abTest'] == 2) echo 'selected';?>>变量1</option>
                                                        <option value="3" <?php if($info['abTest'] == 3) echo 'selected';?>>变量2</option>
                                                        <option value="4" <?php if($info['abTest'] == 4) echo 'selected';?>>非变量1</option>
                                                        <option value="5" <?php if($info['abTest'] == 5) echo 'selected';?>>非变量1非变量2</option>
                                                        <option value="6" <?php if($info['abTest'] == 6) echo 'selected';?>>非基准非变量1</option>
                                                    <?php }else {?>
                                                        <option value="0" <?php if($info['abTest'] == 0) echo 'selected';?>>全部</option>
                                                        <option value="1" <?php if($info['abTest'] == 1) echo 'selected';?>>A组(双)</option>
                                                        <option value="2" <?php if($info['abTest'] == 2) echo 'selected';?>>B组(单)</option>
                                                    <?php }?>

                                                </select>
                                            </div>
                                            <label class="col-sm-2 control-label m-b" id="taLabel" <?=($info['abType']!=2)?'style="display:none;"':''?>>数数分群：</label>
                                            <div class="col-sm-4" id="taSel" <?=($info['abType']!=2)?'style="display:none;"':''?>>
                                                <select class="form-control m-b" name="taTest">
                                                    <?php foreach ($userGroup5 as $k => $v) { ?>
                                                        <option value="<?php echo $k?>" <?php if($info['taTest'] == $k) echo 'selected';?>><?php echo $v?></option>
                                                    <?php }?>

                                                </select>
                                            </div>
                                        </div>
                                        <div class="form-group " >
                                            <label class="col-sm-2 control-label m-b">是否推送：</label>
                                            <div class="col-sm-2">
                                                <select class="form-control m-b" name="openPush">
                                                    <option value="0" <?php if($info['openPush'] == 0) echo 'selected';?>>不推送</option>
                                                    <option value="1" <?php if($info['openPush'] == 1) echo 'selected';?>>推送</option>
                                                </select>
                                            </div>
                                        </div>

                                        <div class="form-group">
                                            <label class="col-sm-2 control-label">活动模板：</label>
                                            <input type="hidden" value="<?php echo $info['type']?>" name="old_type">
                                            <div class="col-sm-4">
                                                <select class="form-control m-b select2" name="type" id="select_type">
                                                    <?php  if(!empty($act_type)) foreach ($act_type as $k => $v) { ?>
                                                        <option value="<?php echo $k?>" <?php if($info['type'] == $k) echo 'selected';?>><?php echo $v['tips']?></option>
                                                    <?php }?>
                                                </select>
                                            </div>
                                            <label class="col-sm-2 control-label">活动皮肤：</label>
                                            <div class="col-sm-3">
                                                <select class="form-control m-b select2" name="cid" id="select_cid">
                                                    <option value="0">选择活动皮肤</option>
                                                    <?php if(!empty($collect_type)) foreach ($collect_type as $k => $v) { ?>
                                                        <option value="<?php echo $v['id']?>" <?php if($info['cid'] == $v['id']) echo 'selected';?>><?php echo $v['name']?></option>
                                                    <?php }?>
                                                </select>
                                            </div>
                                        </div>

                                        <div class="form-group">
                                            <label class="col-sm-2 control-label">开始结束时间：</label>
                                            <div class="col-sm-5">
                                                <input type="text" class="form-control" id="test" placeholder=" 时间选择 " name="sn_time" value="<?php echo date("Y-m-d H:i:s",$info['start_time'])." - ".date("Y-m-d H:i:s",$info['end_time']);?>">
                                            </div>
                                            <?php if(empty($id)){?>
                                                <label class="col-sm-3 control-label">开始自动创建天数：</label>
                                                <div class="col-sm-2">
                                                    <input type="text" class="form-control" value="0" name="authDays">
                                                </div>
                                            <?php }else{?>
                                                <input type="hidden" class="form-control" value="0" name="authDays">
                                            <?php } ?>
                                        </div>

                                        <div class="form-group">
                                            <label class="col-sm-2 control-label">领奖时间：</label>
                                            <div class="col-sm-4">
                                                <input type="text" class="form-control" id="test1" placeholder="yyyy-mm-dd hh:ii:ss" name="reward_time" value="<?php echo date("Y-m-d H:i:s",$info['reward_time']);?>">
                                            </div>
                                            <!--                                            <label class="col-sm-2 control-label">关闭时间：</label>-->
                                            <!--                                            <div class="col-sm-4">-->
                                            <!--                                                <input type="text" class="form-control" id="test2" placeholder="yyyy-mm-dd hh:ii:ss" name="lock_time">-->
                                            <!--                                            </div>-->
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label">活动优先级：</label>
                                            <div class="col-sm-3">
                                                <input type="number" class="form-control"   name="priority" value="<?=$info['priority']?>">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label">显示折扣数字：</label>
                                            <div class="col-sm-3">
                                                <input type="number" class="form-control" name="showDiscountVal" value="<?= $info['commonConf']['showDiscountVal'] ?? 0 ;?>">
                                            </div>
                                        </div>


                                        <div class="form-group " style="display: none">
                                            <label class="col-sm-2 control-label m-b">循环方式：</label>
                                            <div class="col-sm-2">
                                                <select class="form-control m-b" name="loop_type">
                                                    <option value="1" <?php if($info['loop_type'] == 1) echo 'selected';?>>单次</option>
                                                    <option value="2" <?php if($info['loop_type'] == 2) echo 'selected';?>>小时</option>
                                                    <option value="3" <?php if($info['loop_type'] == 3) echo 'selected';?>>天数</option>
                                                </select>
                                            </div>
                                            <div class="col-sm-2 input-group" style="text-align: center">
                                                <input type="text" style="text-align: center" class="form-control" name="loop_num" value="<?php echo $info['loop_num']?>"><span class="input-group-addon" id="unit">小时</span>
                                            </div>
                                        </div>

                                        <div class="form-group">
                                            <label class="col-sm-2 control-label m-b" >
                                                客户端类型选择：
                                            </label>
                                            <div class="col-sm-2">
                                                <select class="form-control m-b" name="client" >
                                                    <option value="0" >全部</option>
                                                    <option value="1" <?php if($info['client'] == 1) echo 'selected';?>>安卓</option>
                                                    <option value="2" <?php if($info['client'] == 2) echo 'selected';?>>IOS</option>
                                                </select>
                                            </div>

                                            <label class="col-sm-2 control-label m-b" style="display: none">
                                                账户类型：
                                            </label>
                                            <div class="col-sm-2" style="display: none">
                                                <select class="form-control m-b" name="user_type">
                                                    <option value="0" >全部</option>
                                                    <option value="1" <?php if($info['user_type'] == 1) echo 'selected';?>>FB</option>
                                                    <option value="2" <?php if($info['user_type'] == 2) echo 'selected';?>>游客</option>
                                                </select>
                                            </div>
                                            <label class="col-sm-2 control-label m-b">
                                                活动类型：
                                            </label>
                                            <div class="col-sm-2">
                                                <select class="form-control m-b" name="uc_type">
                                                    <option value="0" >常规活动</option>
                                                    <option value="1" <?php if($info['uc_type'] == 1) echo 'selected';?>>道具活动</option>
                                                </select>
                                            </div>
                                        </div>

                                        <div class="form-group" id="act_coupon_skin_selector">
                                            <label class="col-sm-2 control-label">活动券皮肤选择器：</label>
                                            <div class="col-sm-2">
                                                <select class="form-control  select2" id="act_coupon_skin">
                                                    <option value="" >选择活动券皮肤</option>
                                                </select>
                                            </div>
                                            <label class="col-sm-2 control-label">活动券皮肤：</label>
                                            <div class="col-sm-2">
                                                <input type="text"  class="form-control" name="act_coupon_skin"  value="" readonly>
                                            </div>

                                            <span class="col-sm-4 couponSkinImgNameTips" style="display: none;color: red;font-weight: bold;font-size: x-large;"></span>
                                        </div>
                                        <div class="form-group" id="ishide">
                                            <label class="col-sm-2 control-label">是否为隐藏活动券：</label>
                                            <div class="col-sm-2">
                                                <select class="form-control  select2"  name="ishide">
                                                    <option value="0" <?=$info['ishide'] == 0 ? 'selected' : ''?>>否</option>
                                                    <option value="1" <?=$info['ishide'] == 1 ? 'selected' : ''?>>是</option>
                                                </select>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label m-b">
                                                参与等级：
                                            </label>
                                            <div class="col-sm-3 input-group" style="padding: 0 15px">
                                                <input type="number" style="text-align: center" class="form-control" name="s_lv" value="<?php echo $info['s_lv']?>">
                                                <span class="input-group-addon">-</span>
                                                <input type="number" style="text-align: center" class="form-control" name="e_lv" value="<?php echo $info['e_lv']?>">
                                            </div>

                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label m-b">
                                                指定UID参与活动：
                                            </label>
                                            <div class="col-sm-6">
                                                <input style="text-overflow:ellipsis;"  type="text" placeholder="多个UID 以英文逗号隔开" class="form-control" name="appointUid" value="<?= $info['commonConf']['appointUid'] ?? ""; ?>">
                                            </div>
                                        </div>

                                        <div class="form-group" style="display: none">
                                            <label class="col-sm-2 control-label m-b">
                                                vip等级：
                                            </label>
                                            <div class="col-sm-3 input-group">
                                                <input type="text" style="text-align: center" class="form-control" name="s_vip" value="<?php echo $info['s_vip']?>"><span class="input-group-addon">-</span><input type="text" style="text-align: center" class="form-control" name="e_vip" value="<?php echo $info['e_vip']?>">
                                            </div>
                                        </div>

                                        <div class="form-group" style="display: none">
                                            <label class="col-sm-2 control-label m-b">
                                                玩家积分：
                                            </label>
                                            <div class="col-sm-3 input-group">
                                                <input type="text" style="text-align: center" class="form-control" name="s_score" value="<?php echo $info['s_score']?>"><span class="input-group-addon">-</span><input type="text" style="text-align: center" class="form-control" name="e_score" value="<?php echo $info['e_score']?>">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label">是否开启版本向下兼容:</label>
                                            <div class="col-sm-3">
                                                <select class="form-control m-b" name="isComVersion">
                                                    <option value="0" >是</option>
                                                    <option value="1" <?php if($info['isComVersion'] == 1) echo 'selected';?>>否</option>
                                                </select>
                                            </div>
                                        </div>

                                        <div class="form-group">
                                            <label class="col-sm-2 control-label">活动版本(不勾选则默认大于1.6.3版本):</label>
                                            <div class="col-sm-10">
                                                <?php foreach ($versions as $v){?>
                                                    <input type="checkbox" class="form-check-input" name="act_version[]" value="<?php echo $v;?>" <?php if(in_array($v,$info['act_version']))echo " checked";?> ><spin><?php echo $v;?></spin>
                                                <?php }?>
                                            </div>
                                        </div>
                                        <!--                                        <div class="form-group">-->
                                        <!--                                            <label class="col-sm-2 control-label">参与国家(不勾选则默认所以国家):</label>-->
                                        <!--                                            <div class="col-sm-10">-->
                                        <?php //foreach ($country as $k=> $v){?>
                                        <!--                                                    <input type="checkbox" class="form-check-input" name="country[]" value="--><?php ////echo $k;?><!--" --><?php ////if(in_array($k,$info['country']))echo " checked";?><!-- ><spin>--><?php ////echo $v;?><!--</spin>-->
                                        <?php //}?>
                                        <!--                                            </div>-->
                                        <!--                                        </div>-->
                                    </div>
                                </div>
                            </div>

                            <div class="ibox float-e-margins">
                                <div class="ibox-title" style="border-top: 0;">
                                    <h3 style="font-weight: bold">活动资源配置</h3>
                                </div>
                                <div class="ibox-content" style="padding:25px 0;">
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">资源文件夹名:</label>
                                        <div class="col-sm-4">
                                            <input type="text" id="imgName" placeholder="public/game/image/activity_2/..." name="imgName" value="<?php echo $info['imgName'];?>" class="form-control">
                                        </div>
                                        <span class="col-sm-4 imgNameTips" style="display: none;color: red;font-weight: bold;font-size: x-large;"></span>
                                    </div>
                                    <div class="form-group" style="display: none">
                                        <label class="col-sm-2 control-label">标题显示文字：</label>
                                        <?php foreach ($langs as $k=>$v){?>
                                            <div class="col-sm-1" style="text-align: center"><span><?php echo $v;?></span><input type="text" style="text-align: center" class="form-control" name="show_title[<?php echo $k;?>]" value="<?php echo @$info['show_title'][$k];?>"></div>
                                        <?php }?>
                                    </div>
                                    <div class="form-group"  style="display: none">
                                        <label class="col-sm-2 control-label">按钮显示文字：</label>
                                        <?php foreach ($langs as $k => $v) { ?>
                                            <div class="col-sm-1" style="text-align: center">
                                                <span><?php echo $v; ?></span>
                                                <input type="text"
                                                       style="text-align: center"
                                                       class="form-control"
                                                       name="bname[<?php echo $k; ?>]"
                                                       value="<?php echo @$info['bname'][$k] ?: $langsBtn[$k] ?? ""; ?>">
                                            </div>
                                        <?php }?>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">按钮/进度条 颜色：</label>
                                        <div class="col-sm-4">
                                            <select class="form-control m-b" name="bcolor">
                                                <?php foreach (ACT_COLORS as $colorId => $colorText){ ?>
                                                    <option value="<?=$colorId?>" <?php if($info['bcolor'] == $colorId) echo 'selected'; ?> ><?=$colorText?></option>
                                                <? }?>
                                            </select>
                                        </div>
                                    </div>
                                    <div class="form-group" >
                                        <label class="col-sm-2 control-label">跳转位置：</label>
                                        <div class="col-sm-4">
                                            <select class="form-control m-b select2" name="bskip">
                                                <option value="0" >不跳转</option>
                                                <?php foreach (APP_URLS as $k=>$v){?>
                                                    <option value="<?php echo $k;?>" <?php if($info['bskip'] == $k) echo 'selected'; ?>><?php echo $v;?></option>
                                                <?php }?>
                                            </select>
                                        </div>
                                        <div class="col-sm-4">
                                            <input type="text" placeholder="https:// or http://" name="burl" value="<?php echo $info['burl'];?>" class="form-control">
                                        </div>
                                    </div>

                                </div>
                            </div>

                            <div class="ibox float-e-margins">
                                <div class="ibox-title" style="border-top: 0;">
                                    <h3 style="font-weight: bold">活动奖励配置<span style="color: #ff0000;">(*任意活动只能配置一张固定金卡)</span></h3>
                                </div>
                                <div class="ibox-content" style="padding:25px 0;" id="reward_info">

                                </div>
                            </div>

                            <div class="col-sm-12" style="margin-top: 3rem">
                                <div class="form-group">
                                    <div class="col-sm-4 col-sm-offset-2">
                                        <button class="btn btn-primary" id="submitBtn" type="button">保存内容</button>
                                        <a href="#activity/h5"><button class="btn btn-white" type="button">返回</button></a>
                                    </div>
                                </div>
                            </div>
                        </form>

                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</div>

<div class="modal inmodal fade" id="myModal5" tabindex="-1" role="dialog"  aria-hidden="true">
    <div class="modal-dialog modal-lg" style="width:1000px">
        <div class="modal-content" style="width: 80%;left: 10%;">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" onclick="closePrize()"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                <h4 class="modal-title">奖励配置</h4>
            </div>
            <div class="modal-body" style="height: 80%;">
                <!--                <from id="prize_from">-->
                <table class="table table-bordered" id="prize_table">
                    <thead><tr class="ths"><th>阶段</th><th>阶段值</th><th>奖励</th></tr></thead>

                    <tbody id="prize_body">

                    </tbody>

                    <tr>
                        <td colspan="3" id="tds">
                            <div class="text-center">
                                <botton class="btn btn-primary" id="addPrize" onclick="addPrize()">添加</botton>
                                <botton class="btn btn-danger del-tr" onclick="delPrize()">删除</botton>
                            </div>
                        </td>
                    </tr>
                </table>
                <!--                </from>-->
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-white" data-dismiss="modal" onclick="closePrize()">关闭</button>
                <button type="button" class="btn btn-primary" onclick="scheduleSubmit()">保存</button>
            </div>
        </div>
    </div>
</div>

<style>
    .prizesSpan{
        text-align: center;
    }

    #commonLine{
        border: 1px solid;
        margin: 2px 0;
    }
</style>
<script src="<?php echo base_url();?>public/h5/js/jquery.min.js"></script>
<script src="<?php echo base_url();?>public/h5/js/bootstrap.min.js"></script>
<script src="<?php echo base_url();?>public/h5/js/content.min.js"></script>
<!--<script src="--><?php //echo base_url();?><!--public/js/laydate/laydate.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>
<script src="<?php echo base_url();?>static/activity/js/hideAct.js?v=<?php echo time();?>"></script>
<script>
    var actJSMapping = JSON.parse('<?=json_encode(ACT_JS_MAPPING)?>');
    var clientFilteredActTypes = JSON.parse('<?=json_encode(CLIENT_FILTERED_ACT_TYPES)?>');
    var typeGrout = ["architecture","accumulated_pay"];
    var spansTypeGrout =["collect","steal","attack","collect_only","rank","rank2"];
    var actTypeProp =["chain_gift","traffic_permit","choose_one","fund","one_plus_gift","safe_surprise"];//允许活动道具的活动类型
    var act_type = '<?php echo $info["type"];?>';//当前活动类型
    var reward_limit= 0;
    var reward_limit2= 0; //阶段奖励2
    var reward_limit3= 0; //阶段奖励3
    var rank_limit=[];
    var treasure_limit=0;
    var trafficPermit_limit=-1;
    var callbackTask_limit =0;
    var trafficPermitTask_limit =0;
    var trafficPermitTask_limit2=0;
    var bet_limit=0;
    var betSpinsRange_limit=0;
    var reward_type=[];//奖品道具分类
    var reward_type_arr =[];//奖品分类数组
    var reward_conf=[];//收集进度值获取配置
    var reward_pro=[];//收集触发概率配置
    var reward_info=[];//奖励详情
    var reward_info_new =[];
    var extra_reward =[];//额外奖励配置 ，包括排行榜排行奖励配置
    var activity_extra_data =[];//额外奖励配置 ，包括排行榜排行奖励配置
    var actProps =[];
    var rootPath = '<?php echo site_url();?>';
    var aid = '<?php echo intval($id);?>';
    var $asyncId = '<?php echo intval($asyncId);?>';
    var imgNames=[];//资源类型
    var chain_gift_conf=[];//连环礼包配置
    var chain_gift=[];
    var spinStage=0;//体力限制收集奖励阶段
    var rankSpinStage=0;//体力限制排行排名奖励
    var spin_reward_limit =[];
    var this_index =0; //当前的spin奖励项id
    var this_shushuIdx=0;//当前数数奖励项id
    var golden_card = [];
    var shop_promotion_limit = 0;
    var steel_safelimit_limit = 0;
    var steel_safelimit_tr = 1;
    var premium_limit = 0;
    var goodSku =[];//礼包商品sku列表
    var coins_list =["coins01","coins02","coins03","coins04","coins05","coins06"];
    var actPropArr = JSON.parse('<?php echo json_encode($actPropsIds);?>');//活动道具id
    var scoreCGType = 1;//超级连环礼包模式
    var scoreCGGidArr  = [];//超级连环礼包模式
    var timeLimit = 0;//当前限时次数
    var timeLimitBet=0;//当前限时bet次数
    var balloon_bet_limit=[];
    var betStage=0;
    var spinsProLimit=0;//体力影响概率系数行次
    var chestArr = JSON.parse('<?php echo json_encode($chestSkin) ?>');
    //var easterEggSkin = JSON.parse('<?php //echo json_encode($easterEggSkin) ?>//');
    //var treasureSkin = JSON.parse('<?php //echo json_encode($treasureSkin) ?>//');
    //var crazyCardGroup = JSON.parse('<?php //echo json_encode($crazyCardGroup) ?>//');
    //var jigsawSkin = JSON.parse('<?php //echo json_encode($jigsawSkin) ?>//');

    var skinsArr = JSON.parse('<?php echo json_encode($skinsArr) ?>');
    console.log(skinsArr)
    var skinsArrKeys = Object.keys(skinsArr)
    var chestPropsArr = [19];
    var chooseOne=0;
    var selGroupId=0;//当前选中super_collect的活动子类型
    var child_groups ={
        "1":"常规收集"
        ,"2":"特殊收集"
        ,"3":"特殊收集+偷"
        ,"4":"特殊收集+打"
        // ,"5":"偷"
        // ,"6":"打"
        // ,"7":"特殊收集偷打(暂不支持)"
        ,"8":"偷特殊"
        ,"9":"打特殊"
    };
    var shushuGroups = JSON.parse('<?php echo json_encode($hideSSGroup);?>');
    var jigsawSourceList = JSON.parse('<?php echo json_encode($jigsawSources);?>');
    var priceSkuMap = JSON.parse('<?php echo $priceSkuMap; ?>');
    var actTypes = JSON.parse('<?php echo json_encode($act_type); ?>');

    var slotGroups = JSON.parse('<?php echo json_encode($slotGroups); ?>');
    var $imgNames = '<?php echo $imgNames;?>';
    var $reward_type = '<?php echo $reward_type;?>';
    console.log($reward_type)
    var $goodSku = '<?php echo $goodSku;?>';
    var $actProps = '<?php echo $actProps;?>';
    var $info = {};
    <?php foreach($info as $k => $v){?>
    $info['<?=$k?>'] = <?=json_encode($v)?>;
    <?php }?>
    console.log(489)
    //var $info = '<?php //echo json_encode($info, JSON_UNESCAPED_UNICODE);?>//';
    //$info = JSON.parse($info)
    var $reward_conf = '<?php echo @$info["reward_conf"];?>';
    var $reward_pro = '<?php echo @$info["reward_pro"];?>';
    var $reward_info = '<?php echo @$info["reward_info"];?>';
    var extra_reward = '<?php echo @$info["extra_reward"];?>';
    var reward_info_new = '<?php echo @$info["reward_info_new"];?>';
    var extraData = JSON.stringify(<?php echo json_encode($info['extraData']);?>);
    var $userGroup2 = '<?php echo json_encode($userGroup2);?>';
    var $hideSSGroup = '<?php echo json_encode($hideSSGroup);?>';
    var $userGroup5 = '<?php echo json_encode($userGroup5);?>';
    var $userGroup3 = '<?php echo json_encode($userGroup3);?>';
    var $curDate = '<?php echo date('Y-m-d H:i',time());?>';

    var date1 = new Date(parseInt('<?php echo $info['start_time']??time();?>')*1000);
    var date2 = new Date(parseInt('<?php echo $info['end_time']??time();?>')*1000);
    var date3 = new Date(parseInt('<?php echo $info['reward_time']??time();?>')*1000);
    var date4 = new Date(parseInt('<?php echo $info['lock_time']??time();?>')*1000);
</script>

<script src="<?php echo base_url();?>static/activity/js/common.js?v=<?php echo time();?>"></script>
