Add: get player enter_code from server

This commit is contained in:
2019-03-15 12:00:30 +09:00
parent 6fef14e159
commit 703d381e79
5 changed files with 121 additions and 55 deletions
+17
View File
@@ -62,6 +62,23 @@ DBConnectManager.prototype.requestCheckPlayerLogin = function(maestroName, playe
xhr.send("maestro_name=" + maestroName + "&name=" + playerName + "&enter_code=" + enterCode);
}
DBConnectManager.prototype.requestPlayerEnterCode = function(maestroID, playerID, onSucceededListener, onFailedListener) {
var xhr = new XMLHttpRequest();
xhr.open("POST", this.phpPath + "server/player/get_entercode.php", true);
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
xhr.onreadystatechange = function() {
if(xhr.readyState == 4 && xhr.status == 200) {
var replyJSON = JSON.parse(xhr.responseText);
if(replyJSON != null && replyJSON["EnterCode"] != null)
onSucceededListener(replyJSON);
else
onFailedListener(replyJSON);
}
};
xhr.send("maestro_id=" + maestroID + "&player_id=" + playerID);
}
/*
DBConnectManager.prototype.requestAppList = function(maestroID, onSucceededListener, onFailedListener) {
var xhr = new XMLHttpRequest();