Add: menu_app_list.php

This commit is contained in:
2018-06-04 11:22:21 +09:00
parent 024145b609
commit ed03e57b34
5 changed files with 246 additions and 27 deletions
+39 -4
View File
@@ -64,6 +64,24 @@ class DBConnectManager {
xhr.send("maestro_name=" + maestroName + "&name=" + userName + "&enter_code=" + enterCode);
}
/*
requestAppList(maestroID, onSucceededListener, onFailedListener) {
let xhr = new XMLHttpRequest();
xhr.open("POST", this.phpPath + "server/app/app_data.php", true);
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
xhr.onreadystatechange = function() {
if(xhr.readyState == 4 && xhr.status == 200) {
let replyJSON = JSON.parse(xhr.responseText);
if(replyJSON != null)
onSucceededListener(replyJSON);
else
onFailedListener(replyJSON);
}
};
xhr.send("maestro_id=" + maestroID);
}
requestActiveAppList(maestroID, onSucceededListener, onFailedListener) {
let xhr = new XMLHttpRequest();
xhr.open("POST", this.phpPath + "server/app/active_app.php", true);
@@ -72,7 +90,25 @@ class DBConnectManager {
if(xhr.readyState == 4 && xhr.status == 200) {
let replyJSON = JSON.parse(xhr.responseText);
if(replyJSON != null && replyJSON.length > 0)
if(replyJSON != null)
onSucceededListener(replyJSON);
else
onFailedListener(replyJSON);
}
};
xhr.send("maestro_id=" + maestroID);
}
*/
requestMenuAppList(maestroID, onSucceededListener, onFailedListener) {
let xhr = new XMLHttpRequest();
xhr.open("POST", this.phpPath + "server/app/menu_app_list.php", true);
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
xhr.onreadystatechange = function() {
if(xhr.readyState == 4 && xhr.status == 200) {
let replyJSON = JSON.parse(xhr.responseText);
if(replyJSON != null)
onSucceededListener(replyJSON);
else
onFailedListener(replyJSON);
@@ -89,7 +125,7 @@ class DBConnectManager {
if(xhr.readyState == 4 && xhr.status == 200) {
let replyJSON = JSON.parse(xhr.responseText);
if(replyJSON != null && replyJSON.length > 0)
if(replyJSON != null)
onSucceededListener(replyJSON);
else
onFailedListener(replyJSON);
@@ -121,9 +157,8 @@ class DBConnectManager {
if(xhr.readyState == 4 && xhr.status == 200) {
let replyJSON = JSON.parse(xhr.responseText);
if(replyJSON != null) {
if(replyJSON != null)
listener(self.parseJSONtoHistoryRecord(replyJSON));
}
else
onFailedListener(replyJSON);
}