Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
check
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abook_web
check
Commits
9bc63ab9
Commit
9bc63ab9
authored
Sep 26, 2022
by
Kang Donghun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
loginJS修正
parent
385251f4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
102 additions
and
315 deletions
+102
-315
abvw/js/login.js
+102
-315
No files found.
abvw/js/login.js
View file @
9bc63ab9
...
...
@@ -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
{
...
...
@@ -178,114 +177,110 @@ LOGIN.processLogin = function() {
LOGIN
.
optionList
=
data
.
serviceOptionList
;
LOGIN
.
getServiceOptionList
();
if
(
data
.
result
==
'success'
)
{
// Save retrieved info
LOGIN
.
saveLoginInfo
();
if
(
ClientData
.
serviceOpt_abook_check
()
==
'Y'
)
{
// Save retrieved info
// set number new push message to 0
ClientData
.
pushInfo_newMsgNumber
(
0
);
// set number new push message to 0
ClientData
.
pushInfo_newMsgNumber
(
0
);
$
(
'#main-error-message'
).
css
(
'display'
,
'none'
);
$
(
'#main-error-message'
).
css
(
'display'
,
'none'
);
if
(
ClientData
.
serviceOpt_encryption
()
==
'Y'
)
{
data
.
requirePasswordChange
=
0
;
}
if
(
ClientData
.
serviceOpt_encryption
()
==
'Y'
)
{
data
.
requirePasswordChange
=
0
;
}
console
.
log
(
"data.requirePasswordChange:"
+
data
.
requirePasswordChange
);
console
.
log
(
"ClientData.serviceOpt_abook_check:"
+
ClientData
.
serviceOpt_abook_check
());
console
.
log
(
"data.requirePasswordChange:"
+
data
.
requirePasswordChange
);
console
.
log
(
"ClientData.serviceOpt_abook_check:"
+
ClientData
.
serviceOpt_abook_check
());
if
(
data
.
requirePasswordChange
==
0
)
{
ClientData
.
userInfo_sid
(
ClientData
.
userInfo_sid_local
());
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
)
{
}
else
if
(
data
.
requirePasswordChange
==
1
)
{
if
(
LOGIN
.
force_pw_change_on_login
==
2
)
{
// force to change
// password
LOGIN
.
OpenChangePasswordDialog
();
$
(
".ui-dialog-titlebar"
).
hide
();
$
(
'#btnSkip'
).
hide
();
$
(
"#txtPwdRemind"
).
css
(
'visibility'
,
'hidden'
);
}
else
if
(
LOGIN
.
force_pw_change_on_login
==
1
)
{
// recommend
// to change
// password
if
(
LOGIN
.
force_pw_change_on_login
==
2
)
{
// force to change
// password
LOGIN
.
OpenChangePasswordDialog
();
$
(
".ui-dialog-titlebar"
).
hide
();
$
(
'#btnSkip'
).
hide
();
$
(
"#txtPwdRemind"
).
css
(
'visibility'
,
'hidden'
);
}
else
if
(
LOGIN
.
force_pw_change_on_login
==
1
)
{
// recommend
// to change
// password
// Check 30 days
skipPwdDate
=
ClientData
.
userInfo_pwdSkipDt
();
// Check 30 days
skipPwdDate
=
ClientData
.
userInfo_pwdSkipDt
();
if
(
skipPwdDate
==
null
||
skipPwdDate
==
'undefined'
)
{
if
(
skipPwdDate
==
null
||
skipPwdDate
==
'undefined'
)
{
LOGIN
.
OpenChangePasswordDialog
();
$
(
'#btnSkip'
).
show
();
$
(
".ui-dialog-titlebar"
).
hide
();
}
else
{
var
date
=
new
Date
();
var
skpPwdDt
=
new
Date
(
skipPwdDate
);
var
numDay
=
date
.
subtractByDays
(
skpPwdDt
);
if
(
numDay
<=
30
)
{
ClientData
.
userInfo_sid
(
ClientData
.
userInfo_sid_local
());
// ホームへ移動 ################ホーム画面URL入力
AVWEB
.
avwScreenMove
(
"abvw/dummy.html"
);
}
else
if
(
numDay
>
30
)
{
LOGIN
.
OpenChangePasswordDialog
();
$
(
'#btnSkip'
).
show
();
$
(
".ui-dialog-titlebar"
).
hide
();
}
else
{
var
date
=
new
Date
();
var
skpPwdDt
=
new
Date
(
skipPwdDate
);
var
numDay
=
date
.
subtractByDays
(
skpPwdDt
);
if
(
numDay
<=
30
)
{
ClientData
.
userInfo_sid
(
ClientData
.
userInfo_sid_local
());
AVWEB
.
avwScreenMove
(
"abvw/"
+
COMMON
.
ScreenIds
.
HomeCheck
);
}
else
if
(
numDay
>
30
)
{
LOGIN
.
OpenChangePasswordDialog
();
$
(
'#btnSkip'
).
show
();
$
(
".ui-dialog-titlebar"
).
hide
();
}
}
}
else
{
// no need to change password
ClientData
.
userInfo_sid
(
ClientData
.
userInfo_sid_local
());
// ホームへ移動
AVWEB
.
avwScreenMove
(
"abvw/"
+
COMMON
.
ScreenIds
.
HomeCheck
);
}
}
else
if
(
data
.
requirePasswordChange
==
2
)
{
}
else
{
// no need to change password
ClientData
.
userInfo_sid
(
ClientData
.
userInfo_sid_local
());
if
(
LOGIN
.
force_pw_change_periodically
==
1
)
{
// recommend to
// change
// password
$
(
'#btnSkip'
).
show
();
skipPwdDate
=
ClientData
.
userInfo_pwdSkipDt
();
// ホームへ移動 ################ホーム画面URL入力
AVWEB
.
avwScreenMove
(
"abvw/dummy.html"
);
}
}
else
if
(
data
.
requirePasswordChange
==
2
)
{
if
(
skipPwdDate
==
null
||
skipPwdDate
==
'undefined'
)
{
LOGIN
.
OpenChangePasswordDialog
();
$
(
".ui-dialog-titlebar"
).
hide
();
}
else
{
if
(
LOGIN
.
force_pw_change_periodically
==
1
)
{
// recommend to
// change
// password
$
(
'#btnSkip'
).
show
();
skipPwdDate
=
ClientData
.
userInfo_pwdSkipDt
();
var
date
=
new
Date
();
var
skpPwdDt
=
new
Date
(
skipPwdDate
);
var
numDay
=
date
.
subtractByDays
(
skpPwdDt
);
if
(
skipPwdDate
==
null
||
skipPwdDate
==
'undefined'
)
{
LOGIN
.
OpenChangePasswordDialog
();
$
(
".ui-dialog-titlebar"
).
hide
();
}
else
{
var
date
=
new
Date
();
var
skpPwdDt
=
new
Date
(
skipPwdDate
);
var
numDay
=
date
.
subtractByDays
(
skpPwdDt
);
if
(
numDay
<=
30
)
{
ClientData
.
userInfo_sid
(
ClientData
.
userInfo_sid_local
());
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
();
$
(
".ui-dialog-titlebar"
).
hide
();
}
}
else
if
(
numDay
>
30
)
{
LOGIN
.
OpenChangePasswordDialog
();
$
(
".ui-dialog-titlebar"
).
hide
();
}
}
else
if
(
LOGIN
.
force_pw_change_periodically
==
2
)
{
// Force
// to
// change
// password
LOGIN
.
OpenChangePasswordDialog
();
$
(
'#btnSkip'
).
hide
();
$
(
".ui-dialog-titlebar"
).
hide
();
$
(
"#txtPwdRemind"
).
css
(
'visibility'
,
'hidden'
);
}
else
{
// No need to change password
ClientData
.
userInfo_sid
(
ClientData
.
userInfo_sid_local
());
// ホームへ移動
AVWEB
.
avwScreenMove
(
"abvw/"
+
COMMON
.
ScreenIds
.
HomeCheck
);
}
}
else
if
(
LOGIN
.
force_pw_change_periodically
==
2
)
{
// Force
// to
// change
// password
LOGIN
.
OpenChangePasswordDialog
();
$
(
'#btnSkip'
).
hide
();
$
(
".ui-dialog-titlebar"
).
hide
();
$
(
"#txtPwdRemind"
).
css
(
'visibility'
,
'hidden'
);
}
else
{
// No need to change password
ClientData
.
userInfo_sid
(
ClientData
.
userInfo_sid_local
());
// ホームへ移動 ################ホーム画面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
;
...
...
@@ -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,44 +571,25 @@ 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
();
$
(
'#formlogin'
).
hide
();
$
(
'#logologin'
).
animate
({
"margin-top"
:
0
},
LOGIN
.
timeWaitSplashScreen
,
function
()
{
$
(
'#formlogin'
).
show
();
$
(
'#menu-language'
).
animate
({
opacity
:
1
},
LOGIN
.
timeWaitSplashScreen
);
$
(
'#formlogin'
).
animate
({
opacity
:
1
},
LOGIN
.
timeWaitSplashScreen
);
$
(
'.cnt_footer'
).
animate
({
opacity
:
1
},
LOGIN
.
timeWaitSplashScreen
);
});
LOGIN
.
initLoginNormalUser
();
// }
// 引数でアカウントパスを受け取ったらセットする
$
(
'#normalUser'
).
show
();
$
(
'#formlogin'
).
hide
();
$
(
'#logologin'
).
animate
({
"margin-top"
:
0
},
LOGIN
.
timeWaitSplashScreen
,
function
()
{
$
(
'#formlogin'
).
show
();
$
(
'#menu-language'
).
animate
({
opacity
:
1
},
LOGIN
.
timeWaitSplashScreen
);
$
(
'#formlogin'
).
animate
({
opacity
:
1
},
LOGIN
.
timeWaitSplashScreen
);
$
(
'.cnt_footer'
).
animate
({
opacity
:
1
},
LOGIN
.
timeWaitSplashScreen
);
});
LOGIN
.
initLoginNormalUser
();
};
// });
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment