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