fo bo 머지작업
This commit is contained in:
@@ -190,10 +190,13 @@
|
||||
data: JSON.stringify(data),
|
||||
dataType:"json",
|
||||
success: function (data) {
|
||||
const result = data.resBody.result.result
|
||||
console.log(data);
|
||||
console.log(data.resBody.result);
|
||||
console.log(JSON.parse(data.resBody.result));
|
||||
const result = JSON.parse(data.resBody.result).result;
|
||||
|
||||
if(result ==='success'){
|
||||
location.href='/mngr/main'
|
||||
location.href='/mngr/main';
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -50,15 +50,18 @@
|
||||
<div class="login__logoWrapper">
|
||||
<a href="javascript:void(0);">
|
||||
<img class="login__logo active" src="/login/mngr/images/logo_default.png" alt="gcone">
|
||||
<img class="login__logo" th:each="site : ${siteList}" th:data-brand="${site.sopmalCd}"
|
||||
th:src="@{${cdnurl}+${site.topFilCours}+'/'+${site.topSysFilNm}}" th:alt="${site.sopmalNm}">
|
||||
<c:forEach var="site" items="${siteList}">
|
||||
<img class="login__logo" data-brand="${site.sopmalCd}" src="@{${cdnurl}+${site.topFilCours}+'/'+${site.topSysFilNm}}" alt="${site.sopmalNm}">
|
||||
</c:forEach>
|
||||
</a>
|
||||
<div class="header__siteSelectArrow"><span class="visually-hidden">사이트 선택</span></div>
|
||||
<div class="siteSelect">
|
||||
<ul class="siteSelect__list" style="width: 300%">
|
||||
<li th:each="site : ${siteList}">
|
||||
<button class="siteSelect__btn" th:id="${site.sopmalCd}" th:text="${site.sopmalNm}"></button>
|
||||
</li>
|
||||
<c:forEach var="site" items="${siteList}">
|
||||
<li>
|
||||
<button class="siteSelect__btn" id="${site.sopmalCd}">${site.sopmalNm}</button>
|
||||
</li>
|
||||
</c:forEach>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@@ -72,7 +75,7 @@
|
||||
<input type="hidden" id="sopmalCd" value="${sopmalCd}">
|
||||
<input type="hidden" id="authSopmalCd" value="">
|
||||
<input autofocus class="input-text full" name="username" id="username" type="text" title="아이디" placeholder="아이디"
|
||||
oninput="fn_hide_alertTxt('username','mbrIdAlertText');">
|
||||
oninput="fn_hide_alertTxt('username','mbrIdAlertText',event);">
|
||||
<p class="login__inputBox__alertText" id="mbrIdAlertText">아이디를 입력해 주세요.</p>
|
||||
<input class="input-text full" name="password" id="password" type="password" title="패스워드"
|
||||
placeholder="비밀번호" onkeyup="fn_hide_alertTxt('password','mbrPwAlertText',event);">
|
||||
@@ -276,12 +279,12 @@
|
||||
password: password,
|
||||
redirectUri: redirectUri,
|
||||
accessUrl: accessUrl,
|
||||
sopmalCd: sopmalCd
|
||||
sopmalCd: sopmalCd,
|
||||
authSopmalCd:authSopmalCd
|
||||
})
|
||||
})
|
||||
.then((response) => {
|
||||
if (response.ok) {
|
||||
console.log('response', response)
|
||||
return response.json();
|
||||
}else{
|
||||
switch(response.status){
|
||||
@@ -297,28 +300,27 @@
|
||||
}
|
||||
})
|
||||
.then((data) => {
|
||||
console.log('Login successful', data);
|
||||
let moveTo = redirectUri;
|
||||
// 로그아웃 상태에서 redirectUri 가 crm 인경우 안먹는 문제 해결
|
||||
const firstPath = moveTo.split('/')[3]; // "/"를 기준으로 분리
|
||||
if (firstPath === 'crm') {
|
||||
console.log('CRM 페이지로 리다이렉션 처리');
|
||||
console.debug('CRM 페이지로 리다이렉션 처리');
|
||||
if(redirectUri === '') moveTo = '/mngr/main?authSopmalCd=\'+authSopmalCd'
|
||||
const encodedRedirectURL = encodeURIComponent(moveTo);
|
||||
window.location.href = '/sso/'+realm+'?redirectUrl='+encodedRedirectURL;
|
||||
}else{
|
||||
if(moveTo.endsWith("/mngr")){
|
||||
|
||||
moveTo = '/main';
|
||||
|
||||
|
||||
if(authSopmalCd !== '') {
|
||||
if (moveTo.endsWith("/mngr")) {
|
||||
moveTo = '/main?authSopmalCd=' + authSopmalCd;
|
||||
} else {
|
||||
moveTo = '/mngr/main?authSopmalCd=' + authSopmalCd;
|
||||
}
|
||||
}else{
|
||||
|
||||
moveTo = '/mngr/main';
|
||||
|
||||
}
|
||||
|
||||
window.location.href = moveTo;
|
||||
const encodedRedirectURL = encodeURIComponent(moveTo);
|
||||
const encodedAccessUrl = encodeURIComponent(accessUrl);
|
||||
window.location.href = '/mngr/tokens/refresh?redirect_uri='+encodedRedirectURL+'&authSopmalCd='+authSopmalCd+'&accessUrl='+encodedAccessUrl;
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
|
||||
Reference in New Issue
Block a user