fix : 로그인 및 게시판 오류
This commit is contained in:
@@ -509,7 +509,15 @@
|
|||||||
})
|
})
|
||||||
.then(data => {
|
.then(data => {
|
||||||
console.log('Login successful', data);
|
console.log('Login successful', data);
|
||||||
let moveTo = new URL(redirectUri).pathname;
|
let moveTo = "";
|
||||||
|
try{
|
||||||
|
moveTo = new URL(redirectUri).pathname;
|
||||||
|
}catch(e){
|
||||||
|
if(redirectUri.startsWith("/",0)){
|
||||||
|
domain = window.location.href.split("/")[0];
|
||||||
|
moveTo = new URL(domain+redirectUri).pathname;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!fn_is_empty(moveTo) && !moveTo.includes('/login') && moveTo !=='/') {
|
if (!fn_is_empty(moveTo) && !moveTo.includes('/login') && moveTo !=='/') {
|
||||||
window.location.href = redirectUri;
|
window.location.href = redirectUri;
|
||||||
|
|||||||
@@ -387,10 +387,15 @@
|
|||||||
})
|
})
|
||||||
.then(data => {
|
.then(data => {
|
||||||
console.log('Login successful', data);
|
console.log('Login successful', data);
|
||||||
let moveTo = new URL(redirectUri).pathname;
|
let moveTo = "";
|
||||||
console.log('move', moveTo);
|
try{
|
||||||
console.log('data.url', data.url);
|
moveTo = new URL(redirectUri).pathname;
|
||||||
|
}catch(e){
|
||||||
|
if(redirectUri.startsWith("/",0)){
|
||||||
|
domain = window.location.href.split("/")[0];
|
||||||
|
moveTo = new URL(domain+redirectUri).pathname;
|
||||||
|
}
|
||||||
|
}
|
||||||
if (!fn_is_empty(moveTo) && !moveTo.includes('/login') && moveTo !=='/') {
|
if (!fn_is_empty(moveTo) && !moveTo.includes('/login') && moveTo !=='/') {
|
||||||
window.location.href = redirectUri;
|
window.location.href = redirectUri;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -152,12 +152,14 @@
|
|||||||
$.ajax({
|
$.ajax({
|
||||||
type: "post",
|
type: "post",
|
||||||
url: "<c:url value ='/sopmal/csc/selectBbscttCn'/>",
|
url: "<c:url value ='/sopmal/csc/selectBbscttCn'/>",
|
||||||
data: {
|
contentType: 'application/json',
|
||||||
|
data: JSON.stringify({
|
||||||
bbsId: bbsId,
|
bbsId: bbsId,
|
||||||
bbscttInnb: bbscttInnb,
|
bbscttInnb: bbscttInnb,
|
||||||
sopmalCd: sopmalCd
|
sopmalCd: sopmalCd
|
||||||
},
|
}),
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
|
console.log(data);
|
||||||
let cn = JSON.parse(data.resBody.result);
|
let cn = JSON.parse(data.resBody.result);
|
||||||
$("#cnDiv").html(cn.cn);
|
$("#cnDiv").html(cn.cn);
|
||||||
if ($("#regusrDvCd").val() === '01' || $("#regusrDvCd").val() === '99') {
|
if ($("#regusrDvCd").val() === '01' || $("#regusrDvCd").val() === '99') {
|
||||||
|
|||||||
@@ -217,11 +217,11 @@
|
|||||||
$.ajax({
|
$.ajax({
|
||||||
type: "post",
|
type: "post",
|
||||||
url: "<c:url value ='/sopmal/csc/selectBbscttCn'/>",
|
url: "<c:url value ='/sopmal/csc/selectBbscttCn'/>",
|
||||||
data: {
|
data: JSON.stringify({
|
||||||
bbsId: bbsId,
|
bbsId: bbsId,
|
||||||
bbscttInnb: bbscttInnb,
|
bbscttInnb: bbscttInnb,
|
||||||
sopmalCd: sopmalCd
|
sopmalCd: sopmalCd
|
||||||
},
|
}),
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
let cn = JSON.parse(data.resBody.result).cn;
|
let cn = JSON.parse(data.resBody.result).cn;
|
||||||
$("#cnBbsUpdt").val(cn);
|
$("#cnBbsUpdt").val(cn);
|
||||||
|
|||||||
@@ -272,10 +272,10 @@
|
|||||||
const bbsId = $("#bbsId").val();
|
const bbsId = $("#bbsId").val();
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "post",
|
type: "post",
|
||||||
data: {
|
data: JSON.stringify({
|
||||||
bbscttInnb: bbscttInnb
|
bbscttInnb: bbscttInnb
|
||||||
,bbsId: bbsId
|
,bbsId: bbsId
|
||||||
},
|
}),
|
||||||
url: '/sopmal/csc/selectBbscttCn',
|
url: '/sopmal/csc/selectBbscttCn',
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
const result = JSON.parse(data.resBody.result);
|
const result = JSON.parse(data.resBody.result);
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
// # 기호가 있는 경우 URL에서 # 기호와 그 이후를 제거
|
// # 기호가 있는 경우 URL에서 # 기호와 그 이후를 제거
|
||||||
var cleanUrl = hashIndex !== -1 ? fullUrl.substring(0, hashIndex) : fullUrl;
|
var cleanUrl = hashIndex !== -1 ? fullUrl.substring(0, hashIndex) : fullUrl;
|
||||||
var encodedRedirectUri = encodeURIComponent(cleanUrl);
|
var encodedRedirectUri = encodeURIComponent(cleanUrl);
|
||||||
location.href = "/login?redirect_uri=" + encodedRedirectUri;
|
location.href = "/sopmal/login?redirect_uri=" + encodedRedirectUri;
|
||||||
</script>
|
</script>
|
||||||
</html>
|
</html>
|
||||||
<%--권한 접근이 안되어 튕겨냄--%>
|
<%--권한 접근이 안되어 튕겨냄--%>
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
// # 기호가 있는 경우 URL에서 # 기호와 그 이후를 제거
|
// # 기호가 있는 경우 URL에서 # 기호와 그 이후를 제거
|
||||||
var cleanUrl = hashIndex !== -1 ? fullUrl.substring(0, hashIndex) : fullUrl;
|
var cleanUrl = hashIndex !== -1 ? fullUrl.substring(0, hashIndex) : fullUrl;
|
||||||
var encodedRedirectUri = encodeURIComponent(cleanUrl);
|
var encodedRedirectUri = encodeURIComponent(cleanUrl);
|
||||||
location.href = "/login?redirect_uri=" + encodedRedirectUri;
|
location.href = "/sopmal/login?redirect_uri=" + encodedRedirectUri;
|
||||||
</script>
|
</script>
|
||||||
</html>
|
</html>
|
||||||
<%--권한 접근이 안되어 튕겨냄--%>
|
<%--권한 접근이 안되어 튕겨냄--%>
|
||||||
Reference in New Issue
Block a user