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