diff --git a/Application/Admin/Controller/GameController.class.php b/Application/Admin/Controller/GameController.class.php index 19a97ebcf..eb6b0b898 100644 --- a/Application/Admin/Controller/GameController.class.php +++ b/Application/Admin/Controller/GameController.class.php @@ -935,13 +935,13 @@ class GameController extends ThinkController $dataList = []; for($i=2;$i<=$highestRow;$i++) { - $promote_id = $objPHPExcel->getActiveSheet()->getCell("B".$i)->getValue(); + $promote_id = $objPHPExcel->getActiveSheet()->getCell("A".$i)->getValue(); $promoteInfo = M('promote','tab_')->field('account')->where(['id' => $promote_id ])->find(); if(empty($promoteInfo)) { break; } - $game_id = $objPHPExcel->getActiveSheet()->getCell("C".$i)->getValue(); + $game_id = $objPHPExcel->getActiveSheet()->getCell("B".$i)->getValue(); $gameInfo = M('game','tab_')->field('game_name,game_status')->where(['id'=>$game_id])->select(); if(empty($gameInfo)) { break; @@ -965,4 +965,21 @@ class GameController extends ThinkController $this->ajaxReturn(json_encode($returnData)); } + //下载模板 + public function downloadDemo() { + $game_id = $_REQUEST['game_id']; + $game_name = M('game','tab_')->where(['id'=>$game_id])->getField('game_name'); + $data[] = [ + 'promoteid' => 99, + 'game_id' => $game_id, + 'game_name' => $game_name + ]; + $field = array( + "promoteid"=>"会长ID", + "game_id"=>"游戏ID(无需修改,已默认当前游戏)", + "game_name"=>"游戏名称(无需修改,已默认当前游戏)" + ); + data2csv($data,"模板",$field); + } + } diff --git a/Application/Admin/View/Game/edit.html b/Application/Admin/View/Game/edit.html index 56c0b7f48..f0c2dc058 100644 --- a/Application/Admin/View/Game/edit.html +++ b/Application/Admin/View/Game/edit.html @@ -968,7 +968,7 @@
@@ -985,12 +985,13 @@ + + + + + - - - - - +