This commit is contained in:
송대일 committed 2026-02-05 10:42:13 +09:00
commit 9460563869
67 files changed
+8090 -1860

No files matched your search

+3 -3
View File
@@ -102,7 +102,7 @@ userGrid
document.getElementById('detailCard').style.display = 'block'
// 하단 사용자 로드
// fetch(`/kngil/bbs/adm.php?action=user_list&member_id=${record.member_id}`)
// fetch(`/admin/api/super?action=user_list&member_id=${record.member_id}`)
// .then(res => res.json())
// .then(d => {
// if (d.status !== 'success') {
@@ -243,7 +243,7 @@ function formatBizNo(value) {
상단 회사 목록 로드
---------------------------------------- */
function loadCompanies() {
fetch('/kngil/bbs/adm.php')
fetch('/admin/api/super')
.then(res => res.json())
.then(json => {
if (!json.records) return
@@ -340,7 +340,7 @@ export function bindSaveButton() {
return
}
fetch('/kngil/bbs/adm.php?action=save', {
fetch('/admin/api/super?action=save', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
+8 -8
View File
@@ -9,7 +9,7 @@ function destroyGrid(name) {
}
function loadBaseCode(mainCd) {
return fetch(`/kngil/bbs/adm_comp.php?action=base_code&main_cd=${mainCd}`)
return fetch(`/admin/api/company?action=base_code&main_cd=${mainCd}`)
.then(res => res.json())
.then(json => {
if (json.status !== 'success') {
@@ -144,7 +144,7 @@ export async function createUserGrid(boxId, options = {}) {
}
function loadUsers() {
fetch('/kngil/bbs/adm_comp.php')
fetch('/admin/api/company')
.then(res => res.text()) // 🔥 먼저 text로 확인
.then(text => {
try {
@@ -168,7 +168,7 @@ export function loadUsersByMember(member_id) {
return
}
fetch('/kngil/bbs/adm_comp.php')
fetch('/admin/api/company')
.then(res => res.json())
.then(json => {
g.clear()
@@ -198,7 +198,7 @@ export function setUserGridMode(mode = 'view') {
export function loadData({ loadSummary = true } = {}) {
fetch('/kngil/bbs/adm_comp.php')
fetch('/admin/api/company')
.then(res => res.json())
.then(async d => {
@@ -323,7 +323,7 @@ document.getElementById('btnSave_comp')?.addEventListener('click', () => {
console.log('INSERTS', inserts)
console.log('UPDATES', updates)
fetch('/kngil/bbs/adm_comp.php', {
fetch('/admin/api/company', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
@@ -408,7 +408,7 @@ document.getElementById('btnDelete')?.addEventListener('click', () => {
w2confirm(`선택한 ${ids.length}명의 사용자를 삭제하시겠습니까?`)
.yes(() => {
fetch('/kngil/bbs/adm_comp.php', {
fetch('/admin/api/company', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
@@ -436,7 +436,7 @@ document.getElementById('btnDelete')?.addEventListener('click', () => {
})
function loadTotalArea(memberId) {
return fetch(`/kngil/bbs/adm_comp.php?action=total_area&member_id=${memberId}`)
return fetch(`/admin/api/company?action=total_area&member_id=${memberId}`)
.then(res => res.json())
.then(json => {
if (json.status !== 'success') {
@@ -467,7 +467,7 @@ function doSearch() {
}
// ⚠️ type === 'id' 는 DB로 안 보냄
fetch(`/kngil/bbs/adm_comp.php?action=list`
fetch(`/admin/api/company?action=list`
+ `&user_nm=${encodeURIComponent(p_user_nm)}`
+ `&dept_nm=${encodeURIComponent(p_dept_nm)}`
+ `&use_yn=${useYn}`
+9 -9
View File
@@ -22,7 +22,7 @@ function destroyGrid(name) {
}
function loadBaseCode(mainCd) {
return fetch(`/kngil/bbs/adm_comp.php?action=base_code&main_cd=${mainCd}`)
return fetch(`/admin/api/company?action=base_code&main_cd=${mainCd}`)
.then(res => res.json())
.then(json => {
if (json.status !== 'success') {
@@ -252,7 +252,7 @@ export function loadUsersByMember(memberId) {
return
}
fetch(`/kngil/bbs/adm_comp.php?action=list&member_id=${memberId}`)
fetch(`/admin/api/company?action=list&member_id=${memberId}`)
.then(res => res.json())
.then(d => {
@@ -286,7 +286,7 @@ export function setUserGridMode(mode = 'view') {
}
export function loadData({ loadSummary = true } = {}) {
fetch('/kngil/bbs/adm_comp.php?action=list')
fetch('/admin/api/company?action=list')
.then(res => res.json())
.then(async d => {
@@ -405,7 +405,7 @@ document.getElementById('btnSave_comp')?.addEventListener('click', () => {
console.log('INSERTS', inserts)
console.log('UPDATES', updates)
fetch('/kngil/bbs/adm_comp.php', {
fetch('/admin/api/company', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
@@ -490,7 +490,7 @@ document.getElementById('btnDelete')?.addEventListener('click', () => {
w2confirm(`선택한 ${ids.length}명의 사용자를 삭제하시겠습니까?`)
.yes(() => {
fetch('/kngil/bbs/adm_comp.php', {
fetch('/admin/api/company', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
@@ -518,7 +518,7 @@ document.getElementById('btnDelete')?.addEventListener('click', () => {
})
function loadTotalArea(memberId) {
return fetch(`/kngil/bbs/adm_comp.php?action=total_area`)
return fetch(`/admin/api/company?action=total_area`)
.then(res => res.json())
.then(json => {
if (json.status !== 'success') {
@@ -549,7 +549,7 @@ function doSearch() {
}
// ⚠️ type === 'id' 는 DB로 안 보냄
fetch(`/kngil/bbs/adm_comp.php?action=list`
fetch(`/admin/api/company?action=list`
+ `&user_nm=${encodeURIComponent(p_user_nm)}`
+ `&dept_nm=${encodeURIComponent(p_dept_nm)}`
+ `&use_yn=${useYn}`
@@ -671,7 +671,7 @@ function openBulkCreatePopup(memberId) {
function runBulkCreate(memberId, csvUrl) {
fetch('/kngil/bbs/adm_comp.php', {
fetch('/admin/api/company', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
@@ -772,7 +772,7 @@ function loadDataByMemberId(memberId) {
return;
}
fetch(`/kngil/bbs/adm_comp.php?action=list&member_id=${encodeURIComponent(memberId)}`)
fetch(`/admin/api/company?action=list&member_id=${encodeURIComponent(memberId)}`)
.then(res => res.json())
.then(async d => {
+4 -4
View File
@@ -11,7 +11,7 @@ function destroyGrid(name) {
}
function loadBaseCode(mainCd) {
return fetch(`/kngil/bbs/adm_comp.php?action=base_code&main_cd=${mainCd}`)
return fetch(`/admin/api/company?action=base_code&main_cd=${mainCd}`)
.then(res => res.json())
.then(json => {
if (json.status !== 'success') {
@@ -101,7 +101,7 @@ export function openfaqPopup() {
// 3. 브라우저 기본 확인창 사용 (가장 확실함)
if (confirm(`선택한 ${ids.length}개의 상품을 삭제하시겠습니까?`)) {
fetch('/kngil/bbs/adm_faq_popup_delete.php', {
fetch('/admin/api/faq/delete', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ action: 'delete', ids: ids })
@@ -170,7 +170,7 @@ export function openfaqPopup() {
console.log('INSERTS', inserts)
console.log('UPDATES', updates)
fetch('/kngil/bbs/adm_faq_popup_save.php', {
fetch('/admin/api/faq/save', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
@@ -271,7 +271,7 @@ async function loadfaqData() {
try {
w2ui.faqGrid.lock('조회 중...', true);
const response = await fetch('/kngil/bbs/adm_faq_popup.php'); // PHP 파일 호출
const response = await fetch('/admin/api/faq'); // PHP 파일 호출
const data = await response.json();
w2ui.faqGrid.clear();
+88 -90
View File
@@ -1,8 +1,8 @@
import { w2grid, w2ui, w2popup, w2alert } from 'https://cdn.jsdelivr.net/gh/vitmalina/w2ui@master/dist/w2ui.es6.min.js'
const USE_YN_ITEMS = [
{ id: 'Y', text: '사용' },
{ id: 'N', text: '미사용' }
{ id: 'Y', text: '사용' },
{ id: 'N', text: '미사용' }
]
/* -------------------------------------------------
공통 유틸
@@ -14,7 +14,7 @@ function destroyGrid(name) {
}
function loadBaseCode(mainCd) {
return fetch(`/kngil/bbs/adm_comp.php?action=base_code&main_cd=${mainCd}`)
return fetch(`/admin/api/company?action=base_code&main_cd=${mainCd}`)
.then(res => res.json())
.then(json => {
if (json.status !== 'success') {
@@ -57,12 +57,12 @@ export function openProductPopup() {
onOpen(event) {
event.onComplete = () => {
// 1. 그리드를 생성합니다.
createProductGrid('#productGrid');
createProductGrid('#productGrid');
// 1. 추가 버튼
// 1. 추가 버튼
document.getElementById('prodAdd').onclick = () => {
const g = w2ui.productGrid
const g = w2ui.productGrid
if (!g) return
// 신규 row용 recid (음수로 충돌 방지)
const newRecid = -Date.now()
@@ -79,7 +79,7 @@ export function openProductPopup() {
};
// 삭제 버튼 이벤트 연결
const removeBtn = document.getElementById('prodRemove');
if (removeBtn) {
@@ -106,43 +106,43 @@ export function openProductPopup() {
// 3. 브라우저 기본 확인창 사용 (가장 확실함)
if (confirm(`선택한 ${ids.length}개의 상품을 삭제하시겠습니까?`)) {
fetch('/kngil/bbs/adm_product_popup_delete.php', {
fetch('/admin/api/product/delete', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ action: 'delete', ids: ids })
})
.then(res => {
// 서버 응답이 오면 일단 텍스트로 받아서 확인
return res.text();
})
.then(text => {
try {
const json = JSON.parse(text);
if (json.status === 'success') {
alert('삭제 완료');
loadProductData(); // 목록 새로고침
} else {
alert(json.message || '삭제 실패');
.then(res => {
// 서버 응답이 오면 일단 텍스트로 받아서 확인
return res.text();
})
.then(text => {
try {
const json = JSON.parse(text);
if (json.status === 'success') {
alert('삭제 완료');
loadProductData(); // 목록 새로고침
} else {
alert(json.message || '삭제 실패');
}
} catch (e) {
console.error('응답 파싱 에러:', text);
alert('서버 응답 처리 중 오류가 발생했습니다.');
}
} catch (e) {
console.error('응답 파싱 에러:', text);
alert('서버 응답 처리 중 오류가 발생했습니다.');
}
})
.catch(err => {
console.error('통신 에러:', err);
alert('서버와 통신할 수 없습니다.');
});
})
.catch(err => {
console.error('통신 에러:', err);
alert('서버와 통신할 수 없습니다.');
});
}
};
}
// 3. 저장 버튼
document.getElementById('prodSave').onclick = () => {
// 현재 사용 중인 grid
const g = w2ui.productGrid
const g = w2ui.productGrid
if (!g) return
const changes = g.getChanges()
if (!changes.length) {
@@ -163,20 +163,20 @@ export function openProductPopup() {
} else {
// UPDATE → PK + 변경 컬럼
updates.push({
itm_cd : merged.itm_cd,
itm_nm : merged.itm_nm,
area : merged.area,
itm_cd: merged.itm_cd,
itm_nm: merged.itm_nm,
area: merged.area,
itm_amt: merged.itm_amt,
use_yn : merged.use_yn?.id || merged.use_yn,
rmks : merged.rmks
use_yn: merged.use_yn?.id || merged.use_yn,
rmks: merged.rmks
})
}
})
console.log('INSERTS', inserts)
console.log('UPDATES', updates)
fetch('/kngil/bbs/adm_product_popup_save.php', {
fetch('/admin/api/product/save', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
@@ -186,26 +186,26 @@ export function openProductPopup() {
})
})
.then(res => {
// 서버가 준 응답이 괜찮은지 확인
if (!res.ok) throw new Error('서버 응답 오류');
return res.json(); // 처음부터 깔끔하게 데이터로 읽기
})
.then(res => {
// 서버가 준 응답이 괜찮은지 확인
if (!res.ok) throw new Error('서버 응답 오류');
return res.json(); // 처음부터 깔끔하게 데이터로 읽기
})
.then(json => {
// 이제 json.status를 바로 쓸 수 있습니다.
if (json.status === 'success') {
w2alert('저장 완료');
w2ui.productGrid.save(); // 빨간 삼각형 없애기
loadProductData(); // 목록 새로고침
} else {
w2alert(json.message || '저장 실패');
}
})
.catch(err => {
console.error('에러 발생:', err);
w2alert('처리 중 오류가 발생했습니다.');
});
.then(json => {
// 이제 json.status를 바로 쓸 수 있습니다.
if (json.status === 'success') {
w2alert('저장 완료');
w2ui.productGrid.save(); // 빨간 삼각형 없애기
loadProductData(); // 목록 새로고침
} else {
w2alert(json.message || '저장 실패');
}
})
.catch(err => {
console.error('에러 발생:', err);
w2alert('처리 중 오류가 발생했습니다.');
});
};
}
@@ -220,7 +220,7 @@ export async function createProductGrid(boxId) {
const authItems = await loadBaseCode('BS210')
const grid = new w2grid({
name: 'productGrid',
box: boxId,
show: {
@@ -230,27 +230,27 @@ export async function createProductGrid(boxId) {
},
columns: [
{ field: 'itm_cd', text: '상품코드', size: '80px',style: 'text-align: center', attr: 'align=center', editable: { type: 'text' } ,sortable: true}, // name 아님!
{ field: 'itm_nm', text: '상품명', size: '120px', style: 'text-align: center', editable: { type: 'text' } ,sortable: true}, // name 아님!
{ field: 'area', text: '제공량', size: '100px', attr: 'align=center',render: 'number:0' , editable: { type: 'float' } ,sortable: true}, // volume 아님!
{ field: 'itm_amt', text: '단가', size: '120px', attr: 'align=center',render: 'number:0', editable: { type: 'int' } ,sortable: true}, //
{ field: 'itm_cd', text: '상품코드', size: '80px', style: 'text-align: center', attr: 'align=center', editable: { type: 'text' }, sortable: true }, // name 아님!
{ field: 'itm_nm', text: '상품명', size: '120px', style: 'text-align: center', editable: { type: 'text' }, sortable: true }, // name 아님!
{ field: 'area', text: '제공량', size: '100px', attr: 'align=center', render: 'number:0', editable: { type: 'float' }, sortable: true }, // volume 아님!
{ field: 'itm_amt', text: '단가', size: '120px', attr: 'align=center', render: 'number:0', editable: { type: 'int' }, sortable: true }, //
{
field: 'use_yn',
text: '사용여부',
size: '80px',
attr: 'align=center',
editable: {
type: 'list',
items: USE_YN_ITEMS,
showAll: true,
openOnFocus: true
field: 'use_yn',
text: '사용여부',
size: '80px',
attr: 'align=center',
editable: {
type: 'list',
items: USE_YN_ITEMS,
showAll: true,
openOnFocus: true
},
render(record, extra) {
return extra?.value?.text || ''
},
sortable: true
},
render(record, extra) {
return extra?.value?.text || ''
},
sortable: true
},
{ field: 'rmks', text: '비고', size: '200px', editable: { type: 'text' } ,sortable: true} // memo 아님!
{ field: 'rmks', text: '비고', size: '200px', editable: { type: 'text' }, sortable: true } // memo 아님!
],
records: [] // 처음엔 비워둠
});
@@ -266,12 +266,10 @@ export async function createProductGrid(boxId) {
async function loadProductData() {
try {
w2ui.productGrid.lock('조회 중...', true);
const response = await fetch('/kngil/bbs/adm_product_popup.php'); // PHP 파일 호출
let data = await response.json();
data = normalizeProductUseYn(data)
const response = await fetch('/kngil/bbs/adm_product_popup.php'); // PHP 파일 호출
const data = await response.json();
w2ui.productGrid.clear();
w2ui.productGrid.add(data);
w2ui.productGrid.unlock();
@@ -284,11 +282,11 @@ async function loadProductData() {
}
function normalizeProductUseYn(records) {
return records.map(r => {
const item = USE_YN_ITEMS.find(u => u.id === r.use_yn)
return {
...r,
use_yn: item || null
}
})
return records.map(r => {
const item = USE_YN_ITEMS.find(u => u.id === r.use_yn)
return {
...r,
use_yn: item || null
}
})
}
+1 -1
View File
@@ -133,7 +133,7 @@ async function loadPurchaseHistoryData() {
searchParams.append('fbuy_dt', sfdt);
searchParams.append('tbuy_dt', stdt);
const response = await fetch('/kngil/bbs/adm_purch_popup.php', {
const response = await fetch('/admin/api/purchase-history', {
method: 'POST',
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
body: searchParams
+1 -1
View File
@@ -173,7 +173,7 @@ function addServiceFromProduct(p) {
------------------------------------------------- */
function loadExistingPurchase(memberId, buyDate) {
fetch(`/kngil/bbs/adm_service.php?member_id=${memberId}&buy_date=${buyDate}`)
fetch(`/admin/api/service?member_id=${memberId}&buy_date=${buyDate}`)
.then(res => res.json())
.then(json => {
+3 -3
View File
@@ -451,7 +451,7 @@ function deleteServiceImmediately(row) {
sq_no: row.sq_no
})
fetch('/kngil/bbs/adm_service.php', {
fetch('/admin/api/service', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
@@ -484,7 +484,7 @@ function isServiceItem(r) {
------------------------------------------------- */
function loadExistingPurchase(memberId, buyDate) {
fetch('/kngil/bbs/adm_service.php', {
fetch('/admin/api/service', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
@@ -647,7 +647,7 @@ function saveService(ctx) {
_deleted: !!r._deleted
}))
fetch('/kngil/bbs/adm_service.php', {
fetch('/admin/api/service', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
+1 -1
View File
@@ -156,7 +156,7 @@ async function loadUseHistoryData(memberId = ''){
searchParams.append('fuse_dt', sfdt);
searchParams.append('tuse_dt', stdt);
const response = await fetch('/kngil/bbs/adm_use_history.php', {
const response = await fetch('/admin/api/use-history', {
method: 'POST',
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
body: searchParams
+41 -1
View File
@@ -4899,4 +4899,44 @@ return lottie;
*/
var Swiper=function(){"use strict";function e(e){return null!==e&&"object"==typeof e&&"constructor"in e&&e.constructor===Object}function t(s,a){void 0===s&&(s={}),void 0===a&&(a={});const i=["__proto__","constructor","prototype"];Object.keys(a).filter((e=>i.indexOf(e)<0)).forEach((i=>{void 0===s[i]?s[i]=a[i]:e(a[i])&&e(s[i])&&Object.keys(a[i]).length>0&&t(s[i],a[i])}))}const s={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector:()=>null,querySelectorAll:()=>[],getElementById:()=>null,createEvent:()=>({initEvent(){}}),createElement:()=>({children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName:()=>[]}),createElementNS:()=>({}),importNode:()=>null,location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function a(){const e="undefined"!=typeof document?document:{};return t(e,s),e}const i={document:s,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle:()=>({getPropertyValue:()=>""}),Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia:()=>({}),requestAnimationFrame:e=>"undefined"==typeof setTimeout?(e(),null):setTimeout(e,0),cancelAnimationFrame(e){"undefined"!=typeof setTimeout&&clearTimeout(e)}};function r(){const e="undefined"!=typeof window?window:{};return t(e,i),e}function n(e){return void 0===e&&(e=""),e.trim().split(" ").filter((e=>!!e.trim()))}function l(e,t){return void 0===t&&(t=0),setTimeout(e,t)}function o(){return Date.now()}function d(e,t){void 0===t&&(t="x");const s=r();let a,i,n;const l=function(e){const t=r();let s;return t.getComputedStyle&&(s=t.getComputedStyle(e,null)),!s&&e.currentStyle&&(s=e.currentStyle),s||(s=e.style),s}(e);return s.WebKitCSSMatrix?(i=l.transform||l.webkitTransform,i.split(",").length>6&&(i=i.split(", ").map((e=>e.replace(",","."))).join(", ")),n=new s.WebKitCSSMatrix("none"===i?"":i)):(n=l.MozTransform||l.OTransform||l.MsTransform||l.msTransform||l.transform||l.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),a=n.toString().split(",")),"x"===t&&(i=s.WebKitCSSMatrix?n.m41:16===a.length?parseFloat(a[12]):parseFloat(a[4])),"y"===t&&(i=s.WebKitCSSMatrix?n.m42:16===a.length?parseFloat(a[13]):parseFloat(a[5])),i||0}function c(e){return"object"==typeof e&&null!==e&&e.constructor&&"Object"===Object.prototype.toString.call(e).slice(8,-1)}function p(){const e=Object(arguments.length<=0?void 0:arguments[0]),t=["__proto__","constructor","prototype"];for(let a=1;a<arguments.length;a+=1){const i=a<0||arguments.length<=a?void 0:arguments[a];if(null!=i&&(s=i,!("undefined"!=typeof window&&void 0!==window.HTMLElement?s instanceof HTMLElement:s&&(1===s.nodeType||11===s.nodeType)))){const s=Object.keys(Object(i)).filter((e=>t.indexOf(e)<0));for(let t=0,a=s.length;t<a;t+=1){const a=s[t],r=Object.getOwnPropertyDescriptor(i,a);void 0!==r&&r.enumerable&&(c(e[a])&&c(i[a])?i[a].__swiper__?e[a]=i[a]:p(e[a],i[a]):!c(e[a])&&c(i[a])?(e[a]={},i[a].__swiper__?e[a]=i[a]:p(e[a],i[a])):e[a]=i[a])}}}var s;return e}function u(e,t,s){e.style.setProperty(t,s)}function m(e){let{swiper:t,targetPosition:s,side:a}=e;const i=r(),n=-t.translate;let l,o=null;const d=t.params.speed;t.wrapperEl.style.scrollSnapType="none",i.cancelAnimationFrame(t.cssModeFrameID);const c=s>n?"next":"prev",p=(e,t)=>"next"===c&&e>=t||"prev"===c&&e<=t,u=()=>{l=(new Date).getTime(),null===o&&(o=l);const e=Math.max(Math.min((l-o)/d,1),0),r=.5-Math.cos(e*Math.PI)/2;let c=n+r*(s-n);if(p(c,s)&&(c=s),t.wrapperEl.scrollTo({[a]:c}),p(c,s))return t.wrapperEl.style.overflow="hidden",t.wrapperEl.style.scrollSnapType="",setTimeout((()=>{t.wrapperEl.style.overflow="",t.wrapperEl.scrollTo({[a]:c})})),void i.cancelAnimationFrame(t.cssModeFrameID);t.cssModeFrameID=i.requestAnimationFrame(u)};u()}function h(e){return e.querySelector(".swiper-slide-transform")||e.shadowRoot&&e.shadowRoot.querySelector(".swiper-slide-transform")||e}function f(e,t){void 0===t&&(t="");const s=r(),a=[...e.children];return s.HTMLSlotElement&&e instanceof HTMLSlotElement&&a.push(...e.assignedElements()),t?a.filter((e=>e.matches(t))):a}function g(e){try{return void console.warn(e)}catch(e){}}function v(e,t){void 0===t&&(t=[]);const s=document.createElement(e);return s.classList.add(...Array.isArray(t)?t:n(t)),s}function w(e){const t=r(),s=a(),i=e.getBoundingClientRect(),n=s.body,l=e.clientTop||n.clientTop||0,o=e.clientLeft||n.clientLeft||0,d=e===t?t.scrollY:e.scrollTop,c=e===t?t.scrollX:e.scrollLeft;return{top:i.top+d-l,left:i.left+c-o}}function b(e,t){return r().getComputedStyle(e,null).getPropertyValue(t)}function y(e){let t,s=e;if(s){for(t=0;null!==(s=s.previousSibling);)1===s.nodeType&&(t+=1);return t}}function E(e,t){const s=[];let a=e.parentElement;for(;a;)t?a.matches(t)&&s.push(a):s.push(a),a=a.parentElement;rLine truncated
//# sourceMappingURL=swiper-bundle.min.js.map
//# sourceMappingURL=swiper-bundle.min.js.map
// OIDC 통합 로그인 버튼 처리
(function() {
'use strict';
function openOidcLogin() {
const width = 500;
const height = 600;
const left = (window.screen.width / 2) - (width / 2);
const top = (window.screen.height / 2) - (height / 2);
window.open(
'/kngil/auth/oidc-login.php',
'oidc_login_popup',
`width=${width},height=${height},left=${left},top=${top},scrollbars=yes`
);
}
function bindOidcButtons() {
const buttons = document.querySelectorAll('[data-oidc-login]');
if (!buttons.length) return;
buttons.forEach((button) => {
button.addEventListener('click', openOidcLogin);
});
}
window.openOidcLogin = openOidcLogin;
window.login = openOidcLogin;
window.addEventListener('message', (event) => {
if (event.data && event.data.type === 'OIDC_LOGIN_SUCCESS') {
window.location.reload();
}
});
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', bindOidcButtons);
} else {
bindOidcButtons();
}
})();
+10
View File
@@ -894,6 +894,10 @@ function join() {
}
function login() {
if (typeof window.openOidcLogin === "function") {
window.openOidcLogin();
return;
}
$(".popup_wrap").hide();
//새로고침 없이 다시 팝업창 열었을때 자동 입력된 id, pw 제거
$("#login_id").val("");
@@ -906,6 +910,12 @@ function login() {
}
function mypage01() {
const raw = (window.IDP_SERVICE_URL || "").trim();
if (raw) {
const url = raw.replace(/\/+$/, "") + "/profile";
window.open(url, "idp_profile", "noopener,noreferrer");
return;
}
$(".popup_wrap").hide();
$(".btn_close").show();
$("#pop_mypage01").show(0, function () {
-17
View File
@@ -35,23 +35,6 @@ if (form) {
})
}
// OIDC 로그인 처리
const btnOidc = document.getElementById('btn_oidc_login')
if (btnOidc) {
btnOidc.addEventListener('click', () => {
const width = 500;
const height = 600;
const left = (window.screen.width / 2) - (width / 2);
const top = (window.screen.height / 2) - (height / 2);
window.open(
'/kngil/auth/oidc-login.php',
'oidc_login_popup',
`width=${width},height=${height},left=${left},top=${top},scrollbars=yes`
);
});
}
// 팝업으로부터의 메시지 수신 (로그인 성공 시 새로고침)
window.addEventListener('message', (event) => {
// 보안을 위해 실제 서비스에서는 event.origin을 체크하는 것이 좋습니다.
+20
View File
@@ -20,7 +20,27 @@ function hide(id) {
마이페이지 1단계 (비밀번호 인증)
- 헤더에서 호출
========================= */
function getIdpProfileUrl() {
const raw = (window.IDP_SERVICE_URL || '').trim()
if (!raw) {
return ''
}
return raw.replace(/\/+$/, '') + '/profile'
}
function openIdpProfile() {
const url = getIdpProfileUrl()
if (!url) {
return false
}
window.open(url, 'idp_profile', 'noopener,noreferrer')
return true
}
window.mypage01 = function () {
if (openIdpProfile()) {
return
}
if (!window.IS_LOGIN) {
if (typeof window.login === 'function') {
window.login()
+10
View File
@@ -894,6 +894,10 @@ function join() {
}
function login() {
if (typeof window.openOidcLogin === "function") {
window.openOidcLogin();
return;
}
$(".popup_wrap").hide();
//새로고침 없이 다시 팝업창 열었을때 자동 입력된 id, pw 제거
$("#login_id").val("");
@@ -906,6 +910,12 @@ function login() {
}
function mypage01() {
const raw = (window.IDP_SERVICE_URL || "").trim();
if (raw) {
const url = raw.replace(/\/+$/, "") + "/profile";
window.open(url, "idp_profile", "noopener,noreferrer");
return;
}
$(".popup_wrap").hide();
$(".btn_close").show();
$("#pop_mypage01").show(0, function () {