From 3bd7893e4f0f96077e299b518efad87a0621f9d8 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Fri, 18 Nov 2022 11:20:05 +0800 Subject: [PATCH] 1 --- webapp/controller/BattleController.class.php | 21 ++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/webapp/controller/BattleController.class.php b/webapp/controller/BattleController.class.php index af1c027e..582c1e24 100644 --- a/webapp/controller/BattleController.class.php +++ b/webapp/controller/BattleController.class.php @@ -24,6 +24,21 @@ class BattleController extends BaseAuthedController { )); } + /* + http post + php://input + { + "team_list": [ + [ + "team_id": 1, + "members": [ + "account_id": "" + ] + ], + ] + } + */ + public function battleReport() { $userInfo = $this->_getOrmUserInfo(); @@ -31,6 +46,12 @@ class BattleController extends BaseAuthedController { $this->_rspErr(1, 'Without this player1'); return; } + $data = json_decode(file_get_contents('php://input'), true); + $teamList = array(); + if ($data) { + $teamList = $data['team_list']; + } + $battleDataService = new services\BattleDataService(); $battleDataService->updateBattleData(); SqlHelper::insert(