Pius-X 1 éve
szülő
commit
62003336be

+ 6 - 2
application/config/menu.php

@@ -314,8 +314,8 @@ $config['menu'] = [
                         "url" => "activity/coinPushPro",
                     ],
                     [
-                        "t"=>"概率干预修正区间",
-                        "url"=>"slot/ceProConf",
+                        "t" => "概率干预修正区间",
+                        "url" => "slot/ceProConf",
                     ],
                 ]
             ],
@@ -413,6 +413,10 @@ $config['menu'] = [
                         "t" => '卡片宝箱概率配置',
                         "url" => 'card/pro',
                     ],
+                    [
+                        "t" => '普卡抽取保底值',
+                        "url" => 'card/floor',
+                    ],
                     [
                         "t" => '卡片权重系数配置',
                         "url" => 'config/cardCoefficient',

+ 2 - 2
application/config/props.php

@@ -56,9 +56,9 @@ return [
     45 => ["id"=>45,"name" =>"玛雅转盘代币","msg" =>"玛雅转盘代币"],
     46 => ["id"=>46,"name" =>"疯狂的卡组","msg" =>"crazy_card_group","type"=>"act"],
 
-    48 => ["id"=>48,"name" =>"随机黑金卡","msg" =>"随机黑金卡"],
+    48 => ["id"=>48,"name" =>"随机星光卡","msg" =>"随机星光卡"],
     49 => ["id"=>49,"name" =>"随机限时金卡","msg" =>"随机限时金卡"],
-    50 => ["id"=>50,"name" =>"随机限时黑金卡","msg" =>"随机限时黑金卡"],
+    50 => ["id"=>50,"name" =>"随机限时星光卡","msg" =>"随机限时星光卡"],
     51 => ["id"=>51,"name" =>"幸运狐狸代币","msg" =>"幸运狐狸代币"],
 
     52 => ["id"=>52,"name" =>"疯狂建造活动","msg" =>"crazy_build","type"=>"act"],

+ 76 - 9
application/controllers/Card.php

@@ -15,7 +15,9 @@ class Card extends MY_Controller{
         ,'四星级概率'
         ,'五星级概率'
         ,'金卡数量(-1,不设限制)'
-        ,'黑金卡数量(-1,不设限制)'];
+        ,'星光卡数量(-1,不设限制)'
+        ,'常规卡保底值'
+    ];
     //宝箱类型
     private $pro_type = [
         1=>'木质宝箱',2=>'白银宝箱',3=>'黄金宝箱',
@@ -63,6 +65,7 @@ class Card extends MY_Controller{
                 'pro'  => json_decode($v['star_pro'],true),
                 'maxGoldCard' => $v['maxGoldCard'],
                 'maxBlackGoldCard' => $v['maxBlackGoldCard'],
+                'floorValue' => $v['floorValue'],
             ];
         }
 
@@ -85,7 +88,7 @@ class Card extends MY_Controller{
         $tb = otable::cardPro_Config();
         foreach ($data as $row){
             $temp = json_encode($row['data']);
-            $rs = oo::commonOprDb('games')->query("UPDATE {$tb} SET star_pro='{$temp}',maxGoldCard='{$row['maxGoldCard']}',maxBlackGoldCard='{$row['maxBlackGoldCard']}' WHERE type={$row['type']}");
+            $rs = oo::commonOprDb('games')->query("UPDATE {$tb} SET star_pro='{$temp}',maxGoldCard='{$row['maxGoldCard']}',maxBlackGoldCard='{$row['maxBlackGoldCard']}',floorValue='{$row['floorValue']}' WHERE type={$row['type']}");
             oo::commonOprRedis('games')->delete(okeys::CardTypePro($row['type']));
             oo::commonOprRedis('games')->delete(okeys::MaxGoldCard($row['type']));
         }
@@ -96,6 +99,32 @@ class Card extends MY_Controller{
         }
     }
 
+    /**
+     * 普卡保底值配置
+     */
+    public function floor()
+    {
+        $data['conf'] = oo::commonOprModel('config')->getCommonConf('CARD_FLOOR_CONF');
+        $this->load->view('card/floor', $data);
+    }
+
+    /**
+     * 普卡保底值配置--action
+     */
+    public function actionFloor()
+    {
+        $conf = array_values($this->input->post()['conf']);
+        $rs = oo::commonOprModel('config')->saveCommonConf('CARD_FLOOR_CONF', $conf, "普卡保底值配置");
+
+        oo::commonOprRedis('games')->delete("CARD_FLOOR_CONF");
+
+        if ($rs == 0) {
+            return $this->response(1, '操作失败');
+        } else {
+            return $this->response(0, '操作成功');
+        }
+    }
+
     public function reward(){
         $title = $this->reward_type;
         $posts = $this->postData;
@@ -219,19 +248,45 @@ class Card extends MY_Controller{
         $this->load->view('card/group', $data);
     }
 
+
     //限时卡组主题配置
     public function limitGroupTheme()
     {
         $data = [];
+        $langList = oo::cfg('lang')['lang_upper2'];
 
         $tb = otable::cardgroup_limit_theme_config();
         $sql = "SELECT * FROM {$tb} WHERE 1";
-        $data['list'] = oo::commonOprDb('slavedb')->getAll($sql);
+        $list = oo::commonOprDb('slavedb')->getAll($sql);
 
-        $tb2 = otable::cardgroup_config();
-        $sql = "SELECT `cgid`,`cg_name_zh` FROM {$tb2} WHERE cg_type= 1";
+        foreach ($list as &$one) {
+            $one['cgids'] = json_decode($one['cgids'], true);
+            $one['lang'] = json_decode(empty($one['lang']) ? '[]' : $one['lang'], true);
+            $one['chests'] = json_decode(empty($one['chests']) ? '[]' : $one['chests'], true);
+            unset($one['last_opentime']);
+        }
+
+        $tb = otable::cardgroup_config();
+        $sql = "SELECT `cgid`,`cg_name_zh` FROM {$tb} WHERE cg_type= 1";
         $data['cgidList'] = oo::commonOprDb('slavedb')->getAll($sql);
 
+
+        $tb = otable::ChestSkinConfig(2);
+        $sql = "SELECT `id`,`name`,`starPro` FROM {$tb}";
+        $ret = oo::commonOprDb('slavedb')->getAll($sql);
+
+        $chestList = [];
+        foreach ($ret as $oneChest) {
+            $starPro = json_decode($oneChest['starPro'], true);
+            if ($starPro['cardType'] == 1) {
+                $chestList[] = ['label' => $oneChest['name'], 'value' => $oneChest['id']];
+            }
+        }
+
+        $data['chestList'] = $chestList;
+        $data['list'] = $list;
+        $data['langList'] = $langList;
+
         $this->load->view('card/limitGroupTheme', $data);
     }
 
@@ -247,12 +302,15 @@ class Card extends MY_Controller{
 
         foreach ($postData as $oneConfig) {
             $id = $oneConfig['id'];
-            $cgids = json_encode($oneConfig['cgids']??[], JSON_NUMERIC_CHECK);
+            $themeRes = $oneConfig['theme_res'];
+            $cgids = json_encode($oneConfig['cgids'] ?? [], JSON_NUMERIC_CHECK);
+            $chests = json_encode($oneConfig['chests'] ?? [], JSON_NUMERIC_CHECK);
+            $lang = json_encode($oneConfig['lang'] ?? [],JSON_UNESCAPED_UNICODE);
             if (in_array($id, $idList)) {
-                $sql = "UPDATE {$tb} SET theme_res='{$oneConfig['theme_res']}',cgids='{$cgids}' WHERE id={$id}";
+                $sql = "UPDATE {$tb} SET `theme_res`='$themeRes',`cgids`='$cgids',`chests`='$chests',`lang`='$lang' WHERE id={$id}";
                 oo::commonOprRedis('games')->delete(okeys::limitGroupCardThemeConfig($id));
             } else {
-                $sql = "INSERT INTO {$tb} (`id`,`theme_res`, `cgids`) VALUES ({$id},'{$oneConfig['theme_res']}','{$cgids}')";
+                $sql = "INSERT INTO {$tb} (`id`,`theme_res`, `cgids`, `chests`, `lang`) VALUES ({$id},'{$themeRes}','{$cgids}','{$chests}','{$lang}')";
             }
 
             $flag = oo::commonOprDb('games')->query($sql);
@@ -260,9 +318,18 @@ class Card extends MY_Controller{
                 return $this->response(1, '操作失败');
             }
         }
+
+        $filename = 'LimitGroupTheme' . time() . '.json';
+
+        oo::commonOprModel("json")->SaveJson($postData, $filename);
+        oo::commonOprModel("json")->setStaticConfig("LimitGroupTheme", $filename);
+
+        $this->actionSyncJson();
+
         return $this->response(0, '操作成功');
     }
 
+
     public function exclusivegroup(){
         $title = [
             '卡组ID'
@@ -352,7 +419,7 @@ class Card extends MY_Controller{
         $title[] = '卡片星级';
         $title[] = '解锁等级';
         $title[] = '图片ID';
-        $title[] = '金卡(1普通2金3黑金)';
+        $title[] = '金卡(1普通2金3星光)';
         $title[] = '权重';
         $title[] = '配图';
 //        $title[] = '上传图片';

+ 1 - 0
application/controllers/Config.php

@@ -4872,6 +4872,7 @@ class Config extends MY_Controller
             $data['pro'] = $pro;
             $data['maxGoldCard'] = $config['maxGoldCard'];
             $data['maxBlackGoldCard'] = $config['maxBlackGoldCard'];
+            $data['floorValue'] = $config['floorValue'];
             $data['blackGoldCardKValue'] = $config['blackGoldCardKValue'];
             $data['cardType'] = $config['cardType'];
 

+ 36 - 3
application/controllers/Export.php

@@ -717,7 +717,7 @@ class Export extends MY_Controller
             , 'ci_star_rank' => '卡片星级'
             , 'ci_lockRank' => '解锁等级'
             , 'ci_picture' => '图片ID'
-            , 'grade' => '金卡(1普2金3黑金)'
+            , 'grade' => '金卡(1普2金3星光)'
             , 'weights' => '权重'];
         $headerTable = array_merge($arr1, $arr2, $arr3);
 
@@ -2654,8 +2654,9 @@ class Export extends MY_Controller
             'star4' => '四星级概率',
             'star5' => '五星级概率',
             'goldNum' => '金卡数量(-1,不设限制)',
-            'blackGoldNum' => '黑金卡数量(-1,不设限制)',
-            'blackGoldKValue' => '黑卡保底值',
+            'blackGoldNum' => '星光卡数量(-1,不设限制)',
+            'blackGoldKValue' => '星光卡保底值',
+            'floorValue' => '常规卡保底值',
             'cardType' => '开卡类型(常规卡,限时卡,全部)',
         ];
         $exportData = [];
@@ -2666,6 +2667,7 @@ class Export extends MY_Controller
                 'goldNum' => intval($starPro['maxGoldCard']),
                 'blackGoldNum' => intval($starPro['maxBlackGoldCard']),
                 'blackGoldKValue' => intval($starPro['blackGoldCardKValue']),
+                'floorValue' => intval($starPro['floorValue']),
                 'cardType' => $cardTypes[$starPro['cardType']] ?? '-',
             ];
             foreach ($starPro['pro'] as $tmp){
@@ -3123,4 +3125,35 @@ class Export extends MY_Controller
         ];
         $this->exportData($headers, $config, '推金币收集物概率配置');
     }
+
+    public function cardFloorConf()
+    {
+        $objPHPExcel = new PHPExcel();
+
+        //处理表头
+        $char = 'A';
+        $headerTable = ['ID', '最小等级', '最大等级', '最小集齐卡片数', '最大集齐卡片数', '保底值'];
+        foreach ($headerTable as $k => $v) {
+            $objPHPExcel->getActiveSheet()->setCellValue($char . '1', $v);
+            $char++;
+        }
+
+        //处理数据
+        $idx = 2;
+        $conf = oo::commonOprModel('config')->getCommonConf('CARD_FLOOR_CONF');
+        foreach ($conf as $id => $vb) {
+            $objPHPExcel->getActiveSheet()->setCellValue("A{$idx}", $id + 1);
+            $objPHPExcel->getActiveSheet()->setCellValue("B{$idx}", $vb['lvStart']);
+            $objPHPExcel->getActiveSheet()->setCellValue("C{$idx}", $vb['lvEnd']);
+            $objPHPExcel->getActiveSheet()->setCellValue("D{$idx}", $vb['cardNumStart']);
+            $objPHPExcel->getActiveSheet()->setCellValue("E{$idx}", $vb['cardNumEnd']);
+            $objPHPExcel->getActiveSheet()->setCellValue("F{$idx}", $vb['floorValue']);
+            $idx++;
+        }
+        $objPHPExcel->getDefaultStyle()->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);
+        $objPHPExcel->getDefaultStyle()->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);
+        $outPutFileName = "普卡抽取保底值_" . date('Y-m-d-His');
+        $this->base($objPHPExcel, $outPutFileName);
+    }
+
 }

+ 36 - 2
application/controllers/Import.php

@@ -2335,8 +2335,8 @@ class Import extends MY_Controller
         foreach ($importArray as $k => $item){
             if($k < 1)continue;
             if(empty($item))continue;
-            list($id, $star1, $star2, $star3, $star4, $star5,$goldNum, $blackGoldNum, $blackGoldKValue, $cardType) = $item;
-            if(!isset($cardTypes[$cardType]))$this->response(-1 , '开卡类型不存在:'.$cardType, $item);
+            list($id, $star1, $star2, $star3, $star4, $star5, $goldNum, $blackGoldNum, $blackGoldKValue, $floorValue, $cardType) = $item;
+            if (!isset($cardTypes[$cardType])) $this->response(-1, '开卡类型不存在:' . $cardType, $item);
             $config = [
                 'pro' => [
                     ['star' => 1, 'v' => intval($star1)],
@@ -2348,6 +2348,7 @@ class Import extends MY_Controller
                 'maxGoldCard' => intval($goldNum),
                 'maxBlackGoldCard' => intval($blackGoldNum),
                 'blackGoldCardKValue' => intval($blackGoldKValue),
+                'floorValue' => intval($floorValue),
                 'cardType' => $cardTypes[$cardType],
             ];
             $reward = json_encode($config);
@@ -2703,4 +2704,37 @@ class Import extends MY_Controller
         oo::commonOprDb('games')->Commit();
         $this->response(0, "上传成功");
     }
+
+    public function cardFloorConf()
+    {
+        $file = $this->uploader->getFileInfo();
+        $xlsReader = IOFactory::createReader('Excel2007');
+        $xlsReader->setReadDataOnly(true);
+        $xlsReader->setLoadSheetsOnly(true);
+        $Sheets = $xlsReader->load($file['url']);
+        $dataArray = $Sheets->getSheet(0)->toArray();
+
+        unset($dataArray[0]);
+        $update = [];
+        foreach ($dataArray as $row) {
+            $update[] = [
+                "lvStart" => $row[1],
+                "lvEnd" => $row[2],
+                "cardNumStart" => $row[3],
+                "cardNumEnd" => $row[4],
+                "floorValue" => $row[5]
+            ];
+        }
+
+        $ret = oo::commonOprModel('config')->saveCommonConf('CARD_FLOOR_CONF', $update, "普卡保底值配置");
+
+        oo::commonOprRedis('games')->delete("CARD_FLOOR_CONF");
+
+        if ($ret == 0) {
+            return $this->response(1, '操作失败');
+        } else {
+            return $this->response(0, '操作成功');
+        }
+    }
+
 }

+ 2 - 2
application/core/MY_Controller.php

@@ -58,9 +58,9 @@ class MY_Controller extends CI_Controller
         "拼图碎片"     =>44 ,
         "玛雅转盘代币"  =>45 ,
 
-        "随机黑金卡"  =>48 ,
+        "随机星光卡"  =>48 ,
         "随机限时金卡"  =>49 ,
-        "随机限时黑金卡"  =>50 ,
+        "随机限时星光卡"  =>50 ,
         "幸运狐狸代币"  =>51 ,
 
         "超级扭蛋代币"  =>60,

+ 4 - 4
application/models/ActBaseModel.php

@@ -25,9 +25,9 @@ class ActBaseModel
     static $actGroupMapping = [];
     static $multiNumTypeReward = [
         '随机金卡',
-        '随机黑金卡',
+        '随机星光卡',
         '随机限时金卡',
-        '随机限时黑金卡',
+        '随机限时星光卡',
         '金币'
     ];
     static $rewardNames = [
@@ -45,9 +45,9 @@ class ActBaseModel
         "拼图碎片" => 44,
         "玛雅转盘代币" => 45,
 
-        "随机黑金卡" => 48,
+        "随机星光卡" => 48,
         "随机限时金卡" => 49,
-        "随机限时黑金卡" => 50,
+        "随机限时星光卡" => 50,
         "幸运狐狸代币" => 51,
         "超级扭蛋代币" => 60,
         "随机工会表情" => 61,

+ 236 - 0
application/views/card/floor.php

@@ -0,0 +1,236 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <title>修改活动</title>
+    <!-- 最新版本的 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">
+    <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">
+    <link rel="stylesheet"
+          href="<?php echo base_url(); ?>public/node_modules/bootstrap-select/dist/css/bootstrap-select.min.css">
+    <script src="<?php echo base_url(); ?>public/node_modules/bootstrap-select/dist/js/bootstrap-select.min.js"></script>
+
+    <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: 80px;
+        }
+
+        #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>
+</head>
+
+<body>
+<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" style="margin-bottom: 10px">
+                            <div class="row" style="padding-left: 15px;">
+                                <button type="button" style="margin-bottom: 10px;width: 80px;" class="btn btn-danger" id="submitBtn">提交</button>
+                                <span id="filespan" class="btn btn-success fileinput-button" style="width: 80px">
+                                    <span >导入</span>
+                                    <input type="file" id="upfile">
+                                </span>
+                                <input type="button" style="display: none;margin-bottom: 10px;width: 80px;" class="btn btn-success" value="上传" id="btnfloor"/>
+                                <a type="button" href="/Export/cardFloorConf" style="margin-bottom: 10px;width: 80px;" class="btn btn-success">导出</a>
+                            </div>
+                        </div>
+                        <div class="container-fluid">
+                            <div class="row">
+                                <div class="col-sm-12">
+                                    <div class="table-responsive ">
+                                        <form id="cardFloorData">
+                                            <table class="table table-bordered">
+                                                <thead>
+                                                <tr>
+                                                    <th width="120">ID</th>
+                                                    <th>最小等级</th>
+                                                    <th>最大等级</th>
+                                                    <th>最小集齐卡片数</th>
+                                                    <th>最大集齐卡片数</th>
+                                                    <th>保底值</th>
+                                                    <th width="100">操作</th>
+                                                </tr>
+                                                </thead>
+                                                <tbody id="CardFloorConf"></tbody>
+                                                <tr>
+                                                    <td colspan="7">
+                                                        <div class="text-center" style="margin-top: 20px">
+                                                            <botton class="btn btn-primary addCardFloorConfTrBtn" onclick="addCardFloorConfTr(this)">添加</botton>
+                                                        </div>
+                                                    </td>
+                                                </tr>
+                                            </table>
+                                        </form>
+                                    </div>
+                                </div>
+                            </div>
+                        </div>
+                    </section>
+                </aside>
+            </div>
+        </div>
+    </div>
+</div>
+</body>
+
+<script src="<?php echo base_url(); ?>static/common/js/props.js"></script>
+<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>
+
+<script>
+    let CardFloorTrCount = 0;
+    const reward = <?php echo json_encode($conf);?>;
+
+    initReward()
+
+    function initReward() {
+        $("#CardFloorConf").empty();
+
+
+        // 奖励回写
+        console.log('reward:', reward)
+        if (!reward) {
+            return
+        }
+
+        $.each(reward, function (idx, item) {
+            $('.addCardFloorConfTrBtn').click()
+            $(`input[name="conf[${idx}][lvStart]"]`).val(item.lvStart)
+            $(`input[name="conf[${idx}][lvEnd]"]`).val(item.lvEnd)
+            $(`input[name="conf[${idx}][cardNumStart]"]`).val(item.cardNumStart)
+            $(`input[name="conf[${idx}][cardNumEnd]"]`).val(item.cardNumEnd)
+            $(`input[name="conf[${idx}][floorValue]"]`).val(item.floorValue)
+        })
+    }
+
+    function addCardFloorConfTr() {
+        const rIdx = CardFloorTrCount++
+        const html = `
+        <tr id="CardFloorTr_${rIdx}" data-idx="${rIdx}">
+            <td width="120"><input type="text" class="form-control" value="${rIdx + 1}" readonly ></td>
+            <td><input type="number" class="form-control" name="conf[${rIdx}][lvStart]" value="0" ></td>
+            <td><input type="number" class="form-control" name="conf[${rIdx}][lvEnd]" value="0" ></td>
+            <td><input type="number" class="form-control" name="conf[${rIdx}][cardNumStart]" value="0" ></td>
+            <td><input type="number" class="form-control" name="conf[${rIdx}][cardNumEnd]" value="0" ></td>
+            <td><input type="number" class="form-control" name="conf[${rIdx}][floorValue]" value="0" ></td>
+            <td width="100">
+                <button type="button" class="btn btn-outline btn-danger" onclick="delCardFloorConfTr(${rIdx})">删除</button>
+            </td>
+        </tr>
+    `;
+        $('#CardFloorConf').append(html)
+    }
+
+    function delCardFloorConfTr(idx) {
+        $("#CardFloorTr_" + idx).remove();
+    }
+</script>
+<script>
+    $(function () {
+        //提交表格数据
+        $('#submitBtn').click(function () {
+            const data = $('#cardFloorData').toObject();
+            $.ajax({
+                type: 'POST',
+                dataType: 'json',
+                data: data,
+                url: 'card/actionFloor',
+                success: function (data) {
+                    alert(data.msg);
+                    if (data.ret == 0) {
+                        window.location.reload()
+                    }
+                },
+                error: function (xhr, error) {
+                    alert(data.msg);
+                }
+            });
+        });
+
+        $("#btnfloor").click(function(){
+            var formData = new FormData();
+            formData.append("file",document.getElementById("upfile").files[0]);
+            showLoading()
+            $.ajax({
+                type: "POST", // 数据提交类型
+                url: "Import/cardFloorConf", // 发送地址
+                data: formData, //发送数据
+                async: true, // 是否异步
+                processData: false, //processData 默认为false,当设置为true的时候,jquery ajax 提交的时候不会序列化 data,而是直接使用data
+                contentType: false, //
+                success: function(data) { // 成功回调
+                    hideLoading();
+                    data = JSON.parse(data);
+                    if(data.ret == 0){
+                        window.location.reload();
+                    }else {
+                        msgTip = $('#msg-tip');
+                        msgTip.messager().warn('上传失败');
+                    }
+                },
+                error:function(){
+                    hideLoading();
+                }
+            });
+        });
+
+        $("#filespan").on("change", "input[type='file']", function() {
+            var filePath = $(this).val();
+            //如果仅上传图片 if(filePath.indexOf("jpg") != -1 || filePath.indexOf("png") != -1) {
+            if (filePath) {
+                $("#btnfloor").click()
+            } else {
+                return false
+            }
+        });
+    });
+</script>

+ 66 - 22
application/views/card/limitGroupTheme.php

@@ -81,56 +81,100 @@
 
     });
 
+    // 卡组Id选项
     var cgidList = (<?php echo json_encode($cgidList);?>)
     var cgidOptions = ''
     cgidList.forEach((item, index) => {
         cgidOptions += `<option value="${item['cgid']}"> ${item['cg_name_zh']}(${item['cgid']})</option>`
     })
 
+    // 卡组Id选项
+    var chestList = (<?php echo json_encode($chestList);?>)
+    var chestOptions = ''
+    chestList.forEach((item, index) => {
+        chestOptions += `<option value="${item['value']}"> ${item['label']}</option>`
+    })
+
     var list = (<?php echo json_encode($list);?>)
+    var langList = (<?php echo json_encode($langList);?>)
     var curId = 0
     if (list) {
         list.forEach((item, index) => {
             var html3 = configLineHtml(item);
             $("#limitGroupTheme").append(html3);
-            $('#cgidSelect' + item['id']).selectpicker('val', JSON.parse(item['cgids']));
-            curId=item['id'];
+
+            $(`#cgidSelect${item.id}`).selectpicker('val', item.cgids);
+            $(`#chestSelect${item.id}`).selectpicker('val', item.chests);
+
+            curId = item['id'];
         });
     }
-    console.log(curId)
 
-    //添加bet
+    //添加
     function addOneLineConf() {
         curId++;
-        var data = {"id": curId, "theme_res": '', "cgids": []};
+        var data = {"id": curId, "theme_res": '', "cgids": [], "chests": [], "lang": []};
         var html = configLineHtml(data);
         $("#limitGroupTheme").append(html);
 
-        $('#cgidSelect' + data['id']).selectpicker('val', data['cgids']);
+        $(`#cgidSelect${data.id}`).selectpicker('val', data.cgids);
+        $(`#chestSelect${data.id}`).selectpicker('val', data.chests);
     }
 
     //超级bet配置行html
     function configLineHtml(data) {
-        var html = '';
-        const id = data["id"];
-        html += '<div class="row AllTypeControl" style="border: 1px solid #CCC;margin:10px 5px;padding: 5px 0;"><div class="form-group">';
-        html += '<label class="col-sm-1 control-label">ID*: </label><div class="col-sm-1"><input type="text" class="form-control" readonly name="config[' + id + '][id]" value="' + data["id"] + '"></div>';
-        html += '<label class="col-sm-1 control-label">主题资源*: </label><div class="col-sm-1"><input type="text" class="form-control" name="config[' + id + '][theme_res]" value="' + data["theme_res"] + '"></div>';
-        html += '<label class="col-sm-2 control-label">限时卡组ID集合*: </label>' + createCGIdsSelect(id);
-
-        html += '</div></div>';
-        return html;
+        const id = data.id;
+        const langHtml = buildLangHtml(id, data.lang)
+        return `
+            <div class="row AllTypeControl" style="border: 1px solid #CCC;margin:10px 5px;padding: 5px 0;">
+                <div class="form-group">
+                    <label class="col-sm-1 control-label">ID*: </label>
+                    <div class="col-sm-1"><input type="text" class="form-control" readonly name="config[${id}][id]" value="${id}"></div>
+
+                    <label class="col-sm-1 control-label">主题资源*: </label>
+                    <div class="col-sm-2"><input type="text" class="form-control" name="config[${id}][theme_res]" value="${data.theme_res}"></div>
+
+                    <label class="col-sm-2 control-label">限时卡组ID集合*: </label>
+                    <div class="col-sm-4">
+                        <label class="select-inline">
+                            <select id="cgidSelect${id}" name="config[${id}][cgids][]" class="selectpicker show-tick form-control" multiple data-live-search="false">
+                                ${cgidOptions}
+                            </select>
+                        </label>
+                    </div>
+                </div>
+
+                <div class="form-group">
+                    <label class="col-sm-2 control-label">限时卡组宝箱*: </label>
+                    <div class="col-sm-4">
+                        <label class="select-inline">
+                            <select id="chestSelect${id}" name="config[${id}][chests][]" class="selectpicker show-tick form-control" multiple data-live-search="false">
+                                ${chestOptions}
+                            </select>
+                        </label>
+                    </div>
+                </div>
+                ${langHtml}
+            </div>`
     }
 
-    function createCGIdsSelect(id) {
-        var html = '';
+    function buildLangHtml(id, langData) {
+        let html = '<div class="form-group">'
+
+        let count = 0
+        for (const key in langList) {
+            if (count % 4 === 0) {
+                html += '</div><div class="form-group">'
+            }
 
-        html += '<div class="col-sm-2"><label class="select-inline">';
-        html += '<select id="cgidSelect' + id + '" name="config[' + id + '][cgids][]" class="selectpicker show-tick form-control" multiple data-live-search="false">';
-        html += cgidOptions;
-        html += '</label></div>';
+            html += `   <label class="col-sm-1 control-label">${langList[key]}</label>
+                        <div class="col-sm-2"><input type="text" class="form-control" name="config[${id}][lang][${key}]" value="${langData[key] ?? ''}"></div>`
+
+            count++
+        }
 
-        return html;
+        html += '</div>'
+        return html
     }
 
 </script>

+ 8 - 5
application/views/card/pro.php

@@ -78,6 +78,7 @@
                                                         <?php } ?>
                                                         <td><?php echo $vl['maxGoldCard'];?></td>
                                                         <td><?php echo $vl['maxBlackGoldCard'];?></td>
+                                                        <td><?php echo $vl['floorValue'];?></td>
                                                     </tr>
                                                 <?php } } else{?>
                                                 <tr>
@@ -179,11 +180,13 @@
                     tempData['type'] = $(td[0]).html();
                 }else if(j==1){
                     continue;
-                }else if(j==td.length - 1){
-                    tempData['maxBlackGoldCard'] = $(td[td.length - 1]).html();
-                }else if(j==td.length - 2){
-                    tempData['maxGoldCard'] = $(td[td.length - 2]).html();
-                }else{
+                } else if (j == td.length - 1) {
+                    tempData['floorValue'] = $(td[td.length - 1]).html();
+                } else if (j == td.length - 2) {
+                    tempData['maxBlackGoldCard'] = $(td[td.length - 2]).html();
+                } else if (j == td.length - 3) {
+                    tempData['maxGoldCard'] = $(td[td.length - 3]).html();
+                } else{
                     temp['star'] = j - 1;
                     temp['v'] = $(td[j]).html();
                     vNum += parseFloat(temp['v']);

+ 6 - 2
application/views/config/chestSkinPro.php

@@ -71,14 +71,18 @@
                                 <div class="col-sm-1">
                                     <input type="text" class="form-control"  name="config[maxGoldCard]" value="<?php echo $maxGoldCard;?>">
                                 </div>
-                                <label class="col-sm-2 control-label">黑金卡数量(-1,不设限制)</label>
+                                <label class="col-sm-2 control-label">星光卡数量(-1,不设限制)</label>
                                 <div class="col-sm-1">
                                     <input type="text" class="form-control" name="config[maxBlackGoldCard]" value="<?php echo $maxBlackGoldCard ?? -1; ?>">
                                 </div>
-                                <label class="col-sm-1 control-label">卡保底值</label>
+                                <label class="col-sm-1 control-label">星光卡保底值</label>
                                 <div class="col-sm-1">
                                     <input type="text" class="form-control" name="config[blackGoldCardKValue]" value="<?php echo $blackGoldCardKValue ?? 0; ?>">
                                 </div>
+                                <label class="col-sm-1 control-label">常规卡保底值</label>
+                                <div class="col-sm-1">
+                                    <input type="text" class="form-control" name="config[floorValue]" value="<?php echo $floorValue ?? 0; ?>">
+                                </div>
                                 <label class="col-sm-1 control-label">开卡类型</label>
                                 <div class="col-sm-1">
                                     <select class="form-control" name="config[cardType]">