Fix: show player count in maestro extension.html

This commit is contained in:
2019-10-31 14:52:06 +09:00
parent cb64f98c64
commit b9998a2957
+16 -19
View File
@@ -1,5 +1,6 @@
<script>
var maestroInfo = new MaestroInfo();
var maestroAvailableDate = new MaestroAvailableDate();
var registeredAccountType = -1;
@@ -7,32 +8,28 @@ var availableDate = "";
var newAvailableDate = "";
$(document).ready(function() {
loadMaestroInfo(maestroID);
maestroInfo.loadMaestroInfo(onLoadSuccessMaestroInfo, onLoadFailMaestroInfo);
});
function loadMaestroInfo(maestroID) {
sendRequestServer( //url, sendParams, onSuccess, onFail, isDebugMode);
"./../server/maestro/maestro_info.php",
"maestro_id=" + maestroID,
function onLoadSuccessMaestroInfo() {
registeredAccountType = maestroInfo.accountType;
(function(jsonData) {
registeredAccountType = jsonData.accountType;
maestroAvailableDate.setEndDateTime(maestroInfo.availableActivateDateTime);
maestroAvailableDate.showEndDate();
maestroAvailableDate.showMaestroExtensionMessage(maestroInfo.maestroName);
maestroAvailableDate.setEndDateTime(jsonData.availableActivateDateTime);
maestroAvailableDate.showEndDate();
maestroAvailableDate.showMaestroExtensionMessage(jsonData.name);
$("#maestro_info_player_count").val("학생수 : " + maestroInfo.getRegisteredPlayerCount() + " / " + maestroInfo.getMaxPlayerCount());
showPrice();
showMaestroName(jsonData.name);
}),
(function(errorMessage, errorCode) {
showErrorMessage(errorMessage, "error");
})
);
showPrice();
showMaestroName(maestroInfo.maestroName);
}
function onLoadFailMaestroInfo(errorMessage, errorCode) {
console.log("errorMessage : " + errorMessage);
console.log("errorCode : " + errorCode);
}
function showPrice() {
$("#price_account").html(