팝빌 알림톡 기능 추가

This commit is contained in:
chym1217
2025-09-04 12:32:31 +09:00
parent 37d0dcb48f
commit 66f6a75a10
99 changed files with 8876 additions and 260 deletions

26
js/kakao5.js Normal file
View File

@ -0,0 +1,26 @@
// 카카오톡 - URL 생성 후 팝업 오픈
async function openKakao5PopupFromAjax(kakaoUrl, getUrlValue) {
const currentUrl = kakaoUrl + '/ajax.get_url.php';
let response, data;
try {
response = await fetch(currentUrl, {
method: 'POST',
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
body: new URLSearchParams({ get_url: getUrlValue })
});
data = await response.json();
} catch (error) {
alert('서버와 통신에 실패했습니다.');
return;
}
if (data && data.url) {
window.open(
data.url,
'win_template',
`width=${data.width},height=${data.height},scrollbars=yes`
);
} else {
alert('URL 생성에 실패했습니다.');
}
}