Commit 9bc63ab9 by Kang Donghun

loginJS修正

parent 385251f4
......@@ -54,7 +54,6 @@ LOGIN.saveLoginInfo = function() {
ClientData.userInfo_accountPath_session(accountPath);
ClientData.userInfo_loginId_session(loginId);
ClientData.userInfo_userName(LOGIN.userInfo_userName);
if (chkRemember == 'checked') {
ClientData.userInfo_rememberLogin(true);
} else {
......@@ -180,9 +179,8 @@ LOGIN.processLogin = function() {
LOGIN.getServiceOptionList();
if (data.result == 'success') {
LOGIN.saveLoginInfo();
if (ClientData.serviceOpt_abook_check() == 'Y') {
// Save retrieved info
LOGIN.saveLoginInfo();
// set number new push message to 0
ClientData.pushInfo_newMsgNumber(0);
......@@ -199,8 +197,8 @@ LOGIN.processLogin = function() {
if (data.requirePasswordChange == 0) {
ClientData.userInfo_sid(ClientData.userInfo_sid_local());
// ホームへ移動
AVWEB.avwScreenMove("abvw/" + COMMON.ScreenIds.HomeCheck);
// ホームへ移動 ################ホーム画面URL入力
AVWEB.avwScreenMove("abvw/dummy.html");
} else if (data.requirePasswordChange == 1) {
......@@ -228,7 +226,8 @@ LOGIN.processLogin = function() {
if (numDay <= 30) {
ClientData.userInfo_sid(ClientData.userInfo_sid_local());
AVWEB.avwScreenMove("abvw/" + COMMON.ScreenIds.HomeCheck);
// ホームへ移動 ################ホーム画面URL入力
AVWEB.avwScreenMove("abvw/dummy.html");
} else if (numDay > 30) {
LOGIN.OpenChangePasswordDialog();
$('#btnSkip').show();
......@@ -238,8 +237,8 @@ LOGIN.processLogin = function() {
} else { // no need to change password
ClientData.userInfo_sid(ClientData.userInfo_sid_local());
// ホームへ移動
AVWEB.avwScreenMove("abvw/" + COMMON.ScreenIds.HomeCheck);
// ホームへ移動 ################ホーム画面URL入力
AVWEB.avwScreenMove("abvw/dummy.html");
}
} else if (data.requirePasswordChange == 2) {
......@@ -261,8 +260,8 @@ LOGIN.processLogin = function() {
if (numDay <= 30) {
ClientData.userInfo_sid(ClientData.userInfo_sid_local());
// ホームへ移動
AVWEB.avwScreenMove("abvw/" + COMMON.ScreenIds.HomeCheck);
// ホームへ移動 ################ホーム画面URL入力
AVWEB.avwScreenMove("abvw/dummy.html");
} else if (numDay > 30) {
LOGIN.OpenChangePasswordDialog();
......@@ -279,15 +278,11 @@ LOGIN.processLogin = function() {
$("#txtPwdRemind").css('visibility', 'hidden');
} else { // No need to change password
ClientData.userInfo_sid(ClientData.userInfo_sid_local());
// ホームへ移動
AVWEB.avwScreenMove("abvw/" + COMMON.ScreenIds.HomeCheck);
// ホームへ移動 ################ホーム画面URL入力
AVWEB.avwScreenMove("abvw/dummy.html");
}
}
} else {
$('#main-error-message').html(AVWEB.format(I18N.i18nText('msgLoginErrWrong'), 'E001'));
$('#main-error-message').show();
}
} else {
LOGIN.login_errorMessage = data.errorMessage;
$('#main-error-message').html(AVWEB.format(I18N.i18nText('msgLoginErrWrong'), data.errorMessage).toString());
$('#main-error-message').show();
......@@ -331,7 +326,8 @@ LOGIN.changePasswordProcess = function() {
ClientData.userInfo_sid(ClientData.userInfo_sid_local());
if (ClientData.serviceOpt_abook_check() == 'Y') {
AVWEB.avwScreenMove("abvw/" + COMMON.ScreenIds.HomeCheck);
// ホームへ移動 ################ホーム画面URL入力
AVWEB.avwScreenMove("abvw/dummy.html");
} else {
$('#main-error-message').html(AVWEB.format(I18N.i18nText('msgLoginErrWrong'), 'E001'));
$('#main-error-message').show();
......@@ -404,7 +400,8 @@ LOGIN.skipPassFunction = function() {
ClientData.userInfo_sid(ClientData.userInfo_sid_local());
if (ClientData.serviceOpt_abook_check() == 'Y') {
AVWEB.avwScreenMove("abvw/" + COMMON.ScreenIds.HomeCheck);
// ホームへ移動 ################ホーム画面URL入力
AVWEB.avwScreenMove("abvw/dummy.html");
} else {
$('#main-error-message').html(AVWEB.format(I18N.i18nText('msgLoginErrWrong'), 'E001'));
$('#main-error-message').show();
......@@ -422,7 +419,7 @@ LOGIN.OpenChangePasswordDialog = function() {
// Close Chnage Password Dialog
LOGIN.CloseChangePasswordDialog = function() {
$("#main-password-change").dialog('close');
$("#main-password-change").hide();
};
// Save Service Option
......@@ -490,197 +487,6 @@ LOGIN.initLoginNormalUser = function() {
$('#txtPassword').keydown(LOGIN.loginWhenClickEnter);
};
// init login for anonymous user
//LOGIN.initLoginAnonymousUser = function() {
//
// document.title = I18N.i18nText('dspLogin') + ' | ' + I18N.i18nText('sysAppTitle');
//
// var sysSettings = AVWEB.avwSysSetting(); // get info in conf.json
// var loginId = sysSettings.anonymousLoginId;
// var urlPath = sysSettings.anonymousLoginPath;
//
// if (loginId == "") {
// loginId = "nologin";
// }
//
// if (urlPath == "") {
// // URLからパース
// urlPath = LOGIN.getUrlPath();
// if (urlPath == null) {
// urlPath = "dmy";
// }
// }
//
// var params = {
// previousSid : null,
// loginId : loginId,
// urlpath : urlPath
// };
//
// AVWEB.avwCmsApiWithUrl(ClientData.conf_apiLoginUrl(), null, 'webClientAnonymousLogin', 'post', params, function(data) {
//
// if (data.result == 'success') {
//
// // clear session of old anonymous user
// // SessionStorageUtils.clear();
// // 警告表示を組み込んだら I18N.i18nText()の値が未定義になるので言語リソース再読み込み
// I18N.initi18n();
//
// // set info user anonymous login
// ClientData.userInfo_accountPath(urlPath);
// ClientData.userInfo_accountPath_session(urlPath);
//
// ClientData.userInfo_loginId(loginId);
// ClientData.userInfo_loginId_session(loginId);
//
// ClientData.userInfo_userName(data.userName);
//
// ClientData.userInfo_sid(data.sid);
// ClientData.userInfo_sid_local(data.sid);
//
// // clear all local storage data of old anonymous
// LocalStorageUtils.clear();
//
// // set number new push message to 0
// ClientData.pushInfo_newMsgNumber(0);
//
// // get service option list
// LOGIN.optionList = data.serviceOptionList;
//
// // save service user option
// LOGIN.saveServiceUserOption();
//
// // hide splash screen then move to home page
// $('#anonymous').fadeOut('slow', 'swing', function() {
// // ホームへ移動
// if (ClientData.serviceOpt_abook_check() == 'Y') {
// AVWEB.avwScreenMove("abvw/" + COMMON.ScreenIds.HomeCheck);
// } else {
// $('#main-error-message').html(AVWEB.format(I18N.i18nText('msgLoginErrWrong'), 'E001'));
// $('#main-error-message').show();
// }
//
// });
// } else {
// if (data.errorMessage != null && data.errorMessage != undefined) {
// LOGIN.showMessageErrorLoginAnonymous(AVWEB.format(I18N.i18nText('msgAnonymousLoginErr'), data.errorMessage).toString());
// } else {
// LOGIN.showMessageErrorLoginAnonymous(I18N.i18nText('msgAnonymousLoginErr2'));
// }
// }
// }, function(xhr, statusText, errorThrown) {
// if (xhr.responseText && xhr.status != 0) {
// var errorMessage = JSON.parse(xhr.responseText).errorMessage;
// if (errorMessage) {
// LOGIN.showMessageErrorLoginAnonymous(AVWEB.format(I18N.i18nText('msgAnonymousLoginErr'), errorMessage).toString());
// } else {
// LOGIN.showMessageErrorLoginAnonymous(I18N.i18nText('msgAnonymousLoginErr2'));
// }
// } else {
// LOGIN.showMessageErrorLoginAnonymous(I18N.i18nText('msgAnonymousLoginErr2'));
// }
// });
//};
// init login for getits user
//LOGIN.initLoginGetitsUser = function() {
//
// // console.log("LOGIN.initLoginGetitsUser");
//
// document.title = I18N.i18nText('dspLogin') + ' | ' + I18N.i18nText('sysAppTitle');
//
// var params = {
// urlpath : ClientData.userInfo_accountPath()
// };
//
// I18N.initi18n();
//
// AVWEB.avwCmsApiWithUrl(ClientData.conf_apiLoginUrl(), ClientData.userInfo_accountPath(), 'webClientGetitsLogin', 'post', params, function(data) {
//
// if (data.result == 'success') {
//
// // clear session of old anonymous user
// // SessionStorageUtils.clear();
// // 警告表示を組み込んだら I18N.i18nText()の値が未定義になるので言語リソース再読み込み
// // I18N.initi18n();
//
// ClientData.userInfo_userName(data.userName);
//
// ClientData.userInfo_sid(data.sid);
// ClientData.userInfo_sid_local(data.sid);
//
// // clear all local storage data of old anonymous
// LocalStorageUtils.clear();
//
// // set number new push message to 0
// ClientData.pushInfo_newMsgNumber(0);
//
// // get service option list
// LOGIN.optionList = data.serviceOptionList;
//
// // save service user option
// LOGIN.saveServiceUserOption();
// // hide splash screen then move to home page
// $('#anonymous').fadeOut('slow', 'swing', function() {
//
// // 引数パラメータがあれば取得
// var paramContentID = COMMON.getUrlParam('cid', '');
// // カタログ対応
// if (paramContentID != '') {
// // OpenUrlでコンテンツ開く
// LOGIN.showContentViewByOpenUrl(paramContentID);
// } else {
// // ホームへ移動
// // AVWEB.avwScreenMove("abvw/" + COMMON.ScreenIds.Home);
// AVWEB.avwScreenMove("abvw/" + COMMON.ScreenIds.Login);
// }
//
// });
// } else {
// if (data.errorMessage != null && data.errorMessage != undefined) {
// LOGIN.showMessageErrorLoginAnonymous(AVWEB.format(I18N.i18nText('msgAnonymousLoginErr'), data.errorMessage).toString());
// } else {
// LOGIN.showMessageErrorLoginAnonymous(I18N.i18nText('msgAnonymousLoginErr2'));
// }
// }
// }, function(xhr, statusText, errorThrown) {
// if (xhr.responseText && xhr.status != 0) {
// var errorMessage = JSON.parse(xhr.responseText).errorMessage;
// if (errorMessage) {
// LOGIN.showMessageErrorLoginAnonymous(AVWEB.format(I18N.i18nText('msgAnonymousLoginErr'), errorMessage).toString());
// } else {
// LOGIN.showMessageErrorLoginAnonymous(I18N.i18nText('msgAnonymousLoginErr2'));
// }
// } else {
// LOGIN.showMessageErrorLoginAnonymous(I18N.i18nText('msgAnonymousLoginErr2'));
// }
// });
//};
//LOGIN.showMessageErrorLoginAnonymous = function(errorMessage) {
// $().toastmessage({
// position : 'middle-center'
// });
// $().toastmessage('showToast', {
// type : 'error',
// sticky : true,
// text : errorMessage
// });
// $('.toast-position-middle-center').css('width', '400px');
//};
//// Get urlPath String
//LOGIN.getUrlPath = function() {
// // URL文字列から事業者ID部分を抽出
// var regex = new RegExp("/webad/([^&#]*)/");
// var results = regex.exec(window.location.href);
// if (results == null) {
// return "";
// } else {
// return results[1];
// }
//};
/* display alert screen */
LOGIN.showAlertScreen = function(errMes, scrMove) {
......@@ -765,24 +571,6 @@ LOGIN.ready = function() {
ClientData.conf_apiResourceDlUrl(sysSettings.apiResourceDlUrl);
}
// if (ClientData.isGetitsMode() == true) {
//
// // 念のため前回までの閲覧ログは削除
// ClientData.ContentLogData([]);
//
// $('#anonymous').show();
// setTimeout(function() {
// LOGIN.initLoginGetitsUser();
// }, LOGIN.timeWaitSplashScreen);
//
// } else if (COMMON.isAnonymousLogin()) {
//
// $('#anonymous').show();
// setTimeout(function() {
// LOGIN.initLoginAnonymousUser();
// }, LOGIN.timeWaitSplashScreen);
// } else {
// 引数でアカウントパスを受け取ったらセットする
$('#normalUser').show();
......@@ -802,7 +590,6 @@ LOGIN.ready = function() {
}, LOGIN.timeWaitSplashScreen);
});
LOGIN.initLoginNormalUser();
// }
};
// });
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment