parseJsonPost 기반 동작 포기

This commit is contained in:
2018-07-03 21:35:17 +09:00
parent c6f3e7672f
commit 7b1a76871a
6 changed files with 27 additions and 34 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ $defaultPost = [
'neutralView' => false,
'showMe' => true
];
$post = WebUtil::parseJsonPost() + $defaultPost;
$post = Json::decode(Util::getReq('data', 'string', '{}'));
if(!$session->isGameLoggedIn()){
$post['neutralView'] = true;
+1 -1
View File
@@ -17,7 +17,7 @@ if (!$generalID) {
]);
}
$jsonPost = WebUtil::parseJsonPost();
$jsonPost = Json::decode(Util::getReq('data', 'string', '{}'));
$msgID = Util::toInt($jsonPost['msgID']??null);
$msgResponse = $jsonPost['response']??null;
+1 -2
View File
@@ -7,8 +7,7 @@ include('func.php');
$session = Session::requireGameLogin([])->setReadOnly();
$userID = Session::getUserID();
$jsonPost = WebUtil::parseJsonPost();
$reqSequence = (int)Util::array_get($jsonPost['sequence'], 0);
$reqSequence = Util::getReq('sequence', 'int', null);
list($generalID, $nationID, $generalName) = DB::db()->queryFirstList(
+1 -1
View File
@@ -4,7 +4,7 @@ namespace sammo;
include 'lib.php';
include 'func.php';
$post = WebUtil::parseJsonPost();
$post = Json::decode(Util::getReq('data', 'string', '{}'));
'@phan-var mixed[] $post';
$v = new Validator($post);
+9 -8
View File
@@ -439,14 +439,15 @@ function reloadWorldMap(option){
url: option.targetJson,
type: 'post',
dataType:'json',
contentType: 'application/json',
data: JSON.stringify({
neutralView:option.neutralView,
year:option.year,
month:option.month,
showMe:option.showMe,
aux:option.aux
})
data: {
data: JSON.stringify({
neutralView:option.neutralView,
year:option.year,
month:option.month,
showMe:option.showMe,
aux:option.aux
})
}
});
deferred
+14 -21
View File
@@ -34,11 +34,12 @@ function responseMessage(msgID, response){
url: 'j_msg_decide_opt.php',
type: 'post',
dataType:'json',
contentType: 'application/json',
data: JSON.stringify({
msgID:msgID,
response:response
})
data: {
data: JSON.stringify({
msgID:msgID,
response:response
})
}
}).then(refreshMsg);
}
@@ -54,10 +55,9 @@ function fetchMsg(){
url: 'j_msg_get_recent.php',
type: 'post',
dataType:'json',
contentType: 'application/json',
data: JSON.stringify({
data: {
sequence:sequence
})
}
});
}
@@ -373,11 +373,12 @@ function activateMessageForm(){
url:'j_msg_submit.php',
type: 'post',
dataType:'json',
contentType: 'application/json',
data: JSON.stringify({
mailbox:parseInt(targetMailbox),
text:text
})
data: {
data: JSON.stringify({
mailbox:parseInt(targetMailbox),
text:text
})
}
});
}
else{
@@ -404,10 +405,6 @@ jQuery(function($){
url:'j_basic_info.php',
type: 'post',
dataType:'json',
contentType: 'application/json',
data: JSON.stringify({
})
}).then(registerGlobal);
//sender_list.json 은 서버측에선 캐시 가능한 데이터임.
@@ -415,10 +412,6 @@ jQuery(function($){
url: 'j_msg_contact_list.php',
type: 'post',
dataType:'json',
contentType: 'application/json',
data: JSON.stringify({
})
});
var MessageList = fetchMsg();