This commit is contained in:
hujiabin 2024-08-19 16:02:16 +08:00
parent a678d8047d
commit 28a61308c9
2 changed files with 10 additions and 41 deletions

View File

@ -72,16 +72,10 @@ class BattleController extends BaseAuthedController {
return;
}
$data = json_decode(file_get_contents('php://input'), true);
/*error_log(json_encode(array(
'a' => 'battleReport',
'post_data' => $data
)));*/
$teamList = array();
if ($data) {
$teamList = $data['team_list'];
}
// error_log(json_encode($teamList));
$battleDataService = new services\BattleDataService();
$battleDataService->teamList = $teamList;
$battleDataService->updateBattleData();
@ -95,7 +89,6 @@ class BattleController extends BaseAuthedController {
'modifytime' => $this->_getNowTime(),
)
);
// error_log(json_encode($battleDataService->getReward()));
$data = array(
'reward' => $battleDataService->getReward()
);
@ -138,7 +131,6 @@ class BattleController extends BaseAuthedController {
return;
}
$data = json_decode(file_get_contents('php://input'), true);
error_log(json_encode($data));
foreach ($data['team_list'] as $teamData){
$this->_handleTeamReport($teamData);
}
@ -214,7 +206,6 @@ class BattleController extends BaseAuthedController {
return;
}
$data = json_decode(file_get_contents('php://input'), true);
error_log(json_encode($data));
$this->_handleTeamReport($data);
// $battle_uuid = getXVal($data,'battle_uuid', 0);
// $room_uuid = getXVal($data,'room_uuid', 0);
@ -285,9 +276,6 @@ class BattleController extends BaseAuthedController {
return;
}
$input = json_decode(file_get_contents('php://input'), true);
if (myself()->_getAccountId() == '6513_2006_U1JcRueKMQxN9BDw8p7pu61gfdzsS7G3') {
error_log(json_encode($input));
}
$roomBattleDataService = new services\RoomBattleDataService();
$roomBattleDataService->mapMode = getXVal($input,'map_mode', 0);
error_log('roomReportMode:'.getXVal($input,'map_mode', 0));
@ -361,7 +349,6 @@ class BattleController extends BaseAuthedController {
}
}
}
error_log(json_encode($realPlayerHash));
$accountIdPair = array();
foreach ($realPlayerHash as $accountId => $val) {
foreach ($realPlayerHashCopy as $accountIdCopy => $valCopy) {
@ -379,7 +366,6 @@ class BattleController extends BaseAuthedController {
}
}
}
error_log(json_encode($accountIdPair));
$nowTime = myself()->_getNowTime();
foreach ($accountIdPair as $pair) {
$accountId1 = $pair[0];
@ -422,7 +408,6 @@ class BattleController extends BaseAuthedController {
public function getBattleData()
{
error_log(json_encode($_REQUEST));
$data = array(
'members' => array()
);
@ -538,7 +523,6 @@ class BattleController extends BaseAuthedController {
$customData = array();
{
$rawData = file_get_contents('php://input');
error_log($rawData);
$sign = strstr($rawData, '|', true);
$customData = strstr($rawData, '|');
$customData = substr($customData, 1);
@ -553,7 +537,6 @@ class BattleController extends BaseAuthedController {
$customData = json_decode($customData, true);
}
error_log(json_encode($customData));
$zoneId = $customData['zone_id'];
$nodeId = $customData['node_id'];
$roomUuid = $customData['room_uuid'];
@ -687,7 +670,6 @@ class BattleController extends BaseAuthedController {
}
array_push($data['ob_list'], $info);
}
error_log(json_encode($data));
myself()->_rspData($data);
}
@ -702,7 +684,7 @@ class BattleController extends BaseAuthedController {
$customData = array();
{
$rawData = file_get_contents('php://input');
error_log($rawData);
$headStr = strstr($rawData, '|', true);
$sign = strstr($headStr, ':', true);
$customData = strstr($rawData, '|');
@ -719,7 +701,7 @@ class BattleController extends BaseAuthedController {
}
$currSeason = mt\RankSeason::getCurrentSeason();
error_log(json_encode($customData));
$zoneId = $customData['zone_id'];
$nodeId = $customData['node_id'];
$modeId = $customData['mode_id'];
@ -833,7 +815,6 @@ class BattleController extends BaseAuthedController {
}
array_push($data['team_list'], $teamInfo);
}
error_log(json_encode($data));
$this->decTicket($r, $customData, $mapModeMeta);
myself()->_rspData($data);
}
@ -844,7 +825,6 @@ class BattleController extends BaseAuthedController {
$customData = array();
{
$rawData = file_get_contents('php://input');
error_log($rawData);
$headStr = strstr($rawData, '|', true);
$sign = strstr($headStr, ':', true);
$customData = strstr($rawData, '|');
@ -937,7 +917,6 @@ class BattleController extends BaseAuthedController {
}
array_push($data['team_list'], $teamInfo);
}
error_log(json_encode($data));
myself()->_rspData($data);
}
@ -979,7 +958,6 @@ class BattleController extends BaseAuthedController {
public function getBattleDataNew()
{
error_log(json_encode($_REQUEST));
$members = json_decode(getReqVal('members', ''), true);
$data = array(
'members' => array()
@ -1197,7 +1175,6 @@ class BattleController extends BaseAuthedController {
public function requestAllocBoxNum()
{
error_log(json_encode($_REQUEST));
$roomUuid = getReqVal('room_uuid', '');
$row = SqlHelper::ormSelectOne(
$this->_getSelfMysql(),
@ -1254,7 +1231,6 @@ class BattleController extends BaseAuthedController {
public function requestReturnBoxNum()
{
error_log(json_encode($_REQUEST));
$roomUuid = getReqVal('room_uuid', '');
$usedNum = getReqVal('used_num', 0);
$allocBoxNum = getReqVal('alloc_box_num', 0);

View File

@ -138,7 +138,6 @@ class BattleDataController extends BaseAuthedController {
return;
}
$data = json_decode(file_get_contents('php://input'), true);
error_log(json_encode($data));
foreach ($data['team_list'] as $teamData){
$this->_handleTeamReport($teamData);
}
@ -212,7 +211,6 @@ class BattleDataController extends BaseAuthedController {
return;
}
$data = json_decode(file_get_contents('php://input'), true);
error_log(json_encode($data));
$this->_handleTeamReport($data);
// $battle_uuid = getXVal($data,'battle_uuid', 0);
// $room_uuid = getXVal($data,'room_uuid', 0);
@ -283,9 +281,6 @@ class BattleDataController extends BaseAuthedController {
return;
}
$input = json_decode(file_get_contents('php://input'), true);
if (myself()->_getAccountId() == '6513_2006_U1JcRueKMQxN9BDw8p7pu61gfdzsS7G3') {
error_log(json_encode($input));
}
$roomBattleDataService = new services\RoomBattleDataService();
$roomBattleDataService->mapMode = getXVal($input,'map_mode', 0);
error_log('roomReportMode:'.getXVal($input,'map_mode', 0));
@ -359,7 +354,6 @@ class BattleDataController extends BaseAuthedController {
}
}
}
error_log(json_encode($realPlayerHash));
$accountIdPair = array();
foreach ($realPlayerHash as $accountId => $val) {
foreach ($realPlayerHashCopy as $accountIdCopy => $valCopy) {
@ -377,7 +371,6 @@ class BattleDataController extends BaseAuthedController {
}
}
}
error_log(json_encode($accountIdPair));
$nowTime = myself()->_getNowTime();
foreach ($accountIdPair as $pair) {
$accountId1 = $pair[0];
@ -536,7 +529,7 @@ class BattleDataController extends BaseAuthedController {
$customData = array();
{
$rawData = file_get_contents('php://input');
error_log($rawData);
$sign = strstr($rawData, '|', true);
$customData = strstr($rawData, '|');
$customData = substr($customData, 1);
@ -551,7 +544,7 @@ class BattleDataController extends BaseAuthedController {
$customData = json_decode($customData, true);
}
error_log(json_encode($customData));
$zoneId = $customData['zone_id'];
$nodeId = $customData['node_id'];
$roomUuid = $customData['room_uuid'];
@ -685,7 +678,7 @@ class BattleDataController extends BaseAuthedController {
}
array_push($data['ob_list'], $info);
}
error_log(json_encode($data));
myself()->_rspData($data);
}
@ -700,7 +693,7 @@ class BattleDataController extends BaseAuthedController {
$customData = array();
{
$rawData = file_get_contents('php://input');
error_log($rawData);
$headStr = strstr($rawData, '|', true);
$sign = strstr($headStr, ':', true);
$customData = strstr($rawData, '|');
@ -717,7 +710,7 @@ class BattleDataController extends BaseAuthedController {
}
$currSeason = mt\RankSeason::getCurrentSeason();
error_log(json_encode($customData));
$zoneId = $customData['zone_id'];
$nodeId = $customData['node_id'];
$modeId = $customData['mode_id'];
@ -831,7 +824,7 @@ class BattleDataController extends BaseAuthedController {
}
array_push($data['team_list'], $teamInfo);
}
error_log(json_encode($data));
$this->decTicket($r, $customData, $mapModeMeta);
myself()->_rspData($data);
}
@ -842,7 +835,7 @@ class BattleDataController extends BaseAuthedController {
$customData = array();
{
$rawData = file_get_contents('php://input');
error_log($rawData);
$headStr = strstr($rawData, '|', true);
$sign = strstr($headStr, ':', true);
$customData = strstr($rawData, '|');
@ -935,7 +928,7 @@ class BattleDataController extends BaseAuthedController {
}
array_push($data['team_list'], $teamInfo);
}
error_log(json_encode($data));
myself()->_rspData($data);
}