Add: edit player enter_code

This commit is contained in:
2019-03-15 12:31:44 +09:00
parent 703d381e79
commit 0cbf30481b
3 changed files with 73 additions and 4 deletions
+19 -4
View File
@@ -154,13 +154,27 @@ var Setup = {
}
var accountValidator = new AccountValidator();
if(accountValidator.isValidPlayerPW(newEnterCode)) {
this.showInfoText("입장번호를 바꾸겠습니다.");
} else {
if(!accountValidator.isValidPlayerPW(newEnterCode)) {
var errorMessage = accountValidator.messageForInvalidPlayerPW(newEnterCode);
this.showInfoText(errorMessage);
}
this.showInfoText("입장번호를 바꾸겠습니다.");
var dbConnectManager = new DBConnectManager();
dbConnectManager.requestEditPlayerEnterCode(
sessionStorageManager.getMaestroID(),
sessionStorageManager.getPlayerID(),
newEnterCode,
(function(jsonData) {
// this.loginSucceeded(jsonData);
this.showInfoText("새로 입력하신 [ " + jsonData["EnterCode"] + " ]로 입장번호가 변경되었습니다.")
this.loadPrevEnterCode();
}).bind(this),
(function(jsonData) {
// this.loginFailed(jsonData);
this.showInfoText("입장번호 변경에 실패하였습니다.")
}).bind(this)
);
/*
var maestroName = this.inputTextMaestroName.canvasInput._value;
sessionStorageManager.setPlayerName(this.inputTextName.canvasInput._value);
@@ -204,7 +218,6 @@ var Setup = {
sessionStorageManager.getPlayerID(),
(function(jsonData) {
this.prevEnterCode = jsonData['EnterCode'];
console.log(this.prevEnterCode);
this.prevEnterCodeText.text = this.prevEnterCode;
}).bind(this),
(function(jsonData) {
@@ -214,6 +227,7 @@ var Setup = {
);
},
/*
loginSucceeded: function(jsonData) {
sessionStorageManager.setMaestroID(jsonData['MaestroID']);
sessionStorageManager.setMaestroAccountType(jsonData['MaestroAccountType']);
@@ -238,5 +252,6 @@ var Setup = {
this.infoText.text = jsonData["error"];
}
}
*/
}