Fix: load how to play from server
This commit is contained in:
@@ -102,7 +102,7 @@ class DBConnectManager {
|
||||
|
||||
requestMenuAppList(maestroID, onSucceededListener, onFailedListener) {
|
||||
let xhr = new XMLHttpRequest();
|
||||
xhr.open("POST", this.phpPath + "server/app/menu_app_list.php", true);
|
||||
xhr.open("POST", this.phpPath + "server/app/menu_active_app_list.php", true);
|
||||
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
|
||||
xhr.onreadystatechange = function() {
|
||||
if(xhr.readyState == 4 && xhr.status == 200) {
|
||||
@@ -119,7 +119,7 @@ class DBConnectManager {
|
||||
|
||||
requestTypingPracticeAppList(maestroID, onSucceededListener, onFailedListener) {
|
||||
let xhr = new XMLHttpRequest();
|
||||
xhr.open("POST", this.phpPath + "server/app/active_typing_practice_app.php", true);
|
||||
xhr.open("POST", this.phpPath + "server/app/active_typing_practice_app_list.php", true);
|
||||
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
|
||||
xhr.onreadystatechange = function() {
|
||||
if(xhr.readyState == 4 && xhr.status == 200) {
|
||||
@@ -335,6 +335,25 @@ class DBConnectManager {
|
||||
return xhr;
|
||||
}
|
||||
|
||||
requestHowToPlay(appID, onSucceededListener, onFailedListener) {
|
||||
let xhr = new XMLHttpRequest();
|
||||
xhr.open("POST", this.phpPath + "server/app/how_to_play.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);
|
||||
console.log(replyJSON);
|
||||
console.log(replyJSON["HowToPlay"]);
|
||||
|
||||
if(replyJSON != null && replyJSON["HowToPlay"] != null)
|
||||
onSucceededListener(replyJSON);
|
||||
else
|
||||
onFailedListener(replyJSON);
|
||||
}
|
||||
};
|
||||
xhr.send("AppID=" + appID);
|
||||
}
|
||||
|
||||
|
||||
|
||||
loadTempPlayerHistory(historyRecordManager) {
|
||||
|
||||
@@ -51,6 +51,14 @@ class SessionStorageManager {
|
||||
return sessionStorage.getItem("playingAppName");
|
||||
}
|
||||
|
||||
// playing app korean name
|
||||
set playingAppKoreanName(value) {
|
||||
sessionStorage.setItem("playingAppKoreanName", value);
|
||||
}
|
||||
get playingAppKoreanName() {
|
||||
return sessionStorage.getItem("playingAppKoreanName");
|
||||
}
|
||||
|
||||
// record
|
||||
set record(value) {
|
||||
sessionStorage.setItem("record", value);
|
||||
|
||||
Reference in New Issue
Block a user