stringHexConverter = { // 핵사 컨버터 converter:function (text){ var byte1 = stringHexConverter.string2bytes(text); var hex_str1 = stringHexConverter.bytes2hexString(byte1); return hex_str1; }, string2bytes:function (text) { var result = []; if (text == null) return result; for (var i = 0; i < text.length; i++) { var c = text.charCodeAt(i); if (c <= 0x7f) result.push(c); else if (c <= 0x07ff) { result.push(((c >> 6) & 0x1F) | 0xC0); result.push((c & 0x3F) | 0x80); } else { result.push(((c >> 12) & 0x0F) | 0xE0); result.push(((c >> 6) & 0x3F) | 0x80); result.push((c & 0x3F) | 0x80); } } return result; }, bytes2hexString:function (bytes) { var result = ""; for (var i = 0; i < bytes.length; i++) { result += stringHexConverter.byte2hex(bytes[i]); } return result; }, byte2hex : function (byte_num) { var digits = (byte_num).toString(16); if (byte_num < 16) return '0' + digits; return digits; } }; unionMember = { isMobile:false, forwarding:function(url){ if(typeof(ReactNativeWebView) == 'object') this.isMobile=true; // 나야나 앱인 경우 모바일앱 인정 : 자체창 처리 //if(document.URL.split('//')[1].split('.')[0] == 'm') this.isMobile=true; if(this.isMobile) location.href=url; else { window.open(url); history.back(); } }, dialogWidth:400, dialogHeight:230, dialogBtn:'확인', dialogAlert:function(msg,url){ $('#dialogCustomDIV').html(msg); $('#dialogCustomDIV').dialog({ modal:true, resizable: false, width:unionMember.dialogWidth, height:unionMember.dialogHeight, open:function(){ $(this).parents('.ui-dialog:first').find('.ui-dialog-titlebar').remove(); }, buttons:[ { text:unionMember.dialogBtn, click:function(){ unionMember.forwarding(url); }, }, ] }); }, join:function(){ // 통합회원 회원가입 바로가기 var url = "https://member.gwdmall.kr"+"/member/agreement?retUrl="+stringHexConverter.converter(document.referrer); //window.open(url, 'unionPopup', 'width=960, height=640, top=100, left=100, fullscreen=yes, menubar=no, status=no, toolbar=no, titlebar=yes, location=no, scrollbar=auto'); window.open(url); }, findIDPW:function(){ // 아이디 찾기 비밀번호 찾기 var url = "https://member.gwdmall.kr"+"/member/find?retUrl="+stringHexConverter.converter(document.URL); window.open(url); }, withdraw:function(){ // 통합탈퇴 바로가기 var url = "https://member.gwdmall.kr"+"/mypage/withdrawal?retUrl="+stringHexConverter.converter(document.URL); window.open(url); }, siteWithdraw:function(){ // 사이트 통합 탈퇴 바로가기 var url = "https://member.gwdmall.kr"+"/mypage/withdrawal?retUrl="+stringHexConverter.converter(document.URL); loadingStop('body',true); openDialogConfirm('현재 통합회원 연결된 ID입니다.
통합회원 탈퇴 페이지로 이동하시겠습니까?',400,170, function(){ unionMember.forwarding(url); }, function(){ alert('통합회원 탈퇴는 별도로 진행해야 합니다.'); }); }, unionWithdraw:function(){ // 통합탈퇴 바로가기 var url = "https://member.gwdmall.kr"+"/mypage/withdrawal?retUrl="+stringHexConverter.converter(document.URL); /*loadingStop('body',true); openDialogAlert('현재 통합회원 계정 ID입니다.
통합회원 탈퇴 페이지로 이동합니다.',400,170, function(){ unionMember.forwarding(url); });*/ unionMember.dialogAlert('현재 통합회원 계정 ID입니다.
통합회원 탈퇴 페이지로 이동합니다.',url); }, unionModify_old:function(){ // 통합수정 바로가기 var url = "https://member.gwdmall.kr"+"/mypage/myinfo?retUrl="+stringHexConverter.converter(document.URL); loadingStop('body',true); openDialogAlert('현재 통합회원 계정 ID입니다.
통합회원 수정 페이지로 이동합니다.',400,170, function(){ unionMember.forwarding(url); }); }, unionModify:function(){ // 통합수정 바로가기 var url = "https://member.gwdmall.kr"+"/mypage/myinfo?retUrl="+stringHexConverter.converter(document.URL); unionMember.dialogAlert('현재 통합회원 계정 ID입니다.
통합회원 수정 페이지로 이동합니다.',url); }, digital1pass:function(){ // 디지털원패스 var referrer = document.referrer; if( !referrer ) referrer = window.location.origin; var url = "https://member.gwdmall.kr"+"/sso/digital1pass?retUrl="+stringHexConverter.converter(referrer); window.open(url, 'unionPopup', 'width=460, height=720, top=100, left=100, fullscreen=yes, menubar=no, status=no, toolbar=no, titlebar=yes, location=no, scrollbar=no'); }, };