This commit is contained in:
aozhiwei 2022-11-18 11:20:05 +08:00
parent db8f54e2ab
commit 3bd7893e4f

View File

@ -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(