최신 수정내용 포멧 수정, 메모 maxlength 25 추가, 휴대폰등록 최대 5개 ip등록 최대 10개 수정
This commit is contained in:
parent
861c70c5b1
commit
78837eecf8
@ -1107,7 +1107,7 @@
|
||||
<select id="mberManageDAO.findTopByregDateFromCertLog" parameterClass="authCertVO" resultClass="String">
|
||||
|
||||
SELECT
|
||||
REGDATE
|
||||
DATE_FORMAT(REGDATE, '%Y-%m-%d %T') AS regdate
|
||||
FROM
|
||||
mj_cert_log
|
||||
WHERE
|
||||
|
||||
@ -1697,21 +1697,11 @@ function actionLogin() {
|
||||
<button type="button" class="btnType btnType3" onclick="location.href='/web/user/mberInfoIndex.do'">마이페이지</button>
|
||||
<button type="button" class="btnType btnType2" onclick="location.href='/web/uat/uia/actionLogout.do'">로그아웃</button>
|
||||
|
||||
<!-- <div class="security_box"> -->
|
||||
<%-- <a href="<c:out value="/web/user/mberSecureLogin.do"/>"><p class="title"><i class="icon_lock"></i>보안로그인</p></a> --%>
|
||||
<!-- <a href="#" id="secuLoginFlag" class="state"> </a> -->
|
||||
<!-- <a href="#" class="state off">OFF</a> -->
|
||||
<!-- </div> -->
|
||||
|
||||
|
||||
<div class="security_box">
|
||||
<a href="<c:out value="/web/user/mberSecureLogin.do"/>" class="title">보안로그인</a><!-- 보안로그인 클릭시 보안로그인 홈페이지로 -->
|
||||
<a href="#" id="secuLoginFlag" class="state"></a><!-- ON/OFF 클릭시 이벤트 발생 -->
|
||||
</div>
|
||||
<!-- <div class="security_box green_box"> -->
|
||||
<!-- <a href="#" class="title">보안로그인</a> -->
|
||||
<!-- <a href="#" class="state on">ON</a> -->
|
||||
<!-- </div> -->
|
||||
|
||||
|
||||
</div>
|
||||
@ -1720,7 +1710,7 @@ function actionLogin() {
|
||||
<div class="holdingsum_box">
|
||||
<i></i>
|
||||
<fmt:formatNumber type="number" maxFractionDigits="3" value="${userMoney}" var="commaPrice" />
|
||||
<p>보유잔액<em>(캐시)</em> <span class="fwMd" id="hdUserMoney"><c:out value="${commaPrice}"/></span>원</p>
|
||||
<p>보유잔액<!-- <em>(캐시)</em> --> <span class="fwMd" id="hdUserMoney"><c:out value="${commaPrice}"/></span>원</p>
|
||||
<c:if test="${prePaymentYn eq 'N'}">
|
||||
<dl>
|
||||
<dd>후불제 고객의 보유잔액(캐시)은 당월 발송 가능<br>금액을 말하며 <span>매월 1일 자동으로 충전</span>됩니다.</dd>
|
||||
@ -1741,14 +1731,14 @@ function actionLogin() {
|
||||
<div class="point">
|
||||
<i></i>
|
||||
<fmt:formatNumber type="number" maxFractionDigits="3" value="${userPoint}" var="commaPoint" />
|
||||
<p><em>적립</em>포인트 <span class="fwMd"><c:out value="${commaPoint}"/></span>원</p>
|
||||
<p><!-- <em>적립</em> -->포인트 <span class="fwMd"><c:out value="${commaPoint}"/></span>원</p>
|
||||
<button type="button" data-tooltip="popup04" class="btnType btnType3">교환</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="event">
|
||||
<!-- <div class="event">
|
||||
<span><i></i>이달의 이벤트</span>
|
||||
<button type="button" class="btnType btnType2" onclick="location.href='/web/cop/bbs/EventList.do'">GO</button>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
<!-- <div class="login_right">
|
||||
<button type="button" data-tooltip="popupJunk" class="btnType btnType14 tab1"><i></i>통신사 스팸규격안내</button>
|
||||
|
||||
@ -84,6 +84,14 @@ $(document).ready(function(){
|
||||
alert("핸드폰번호를 입력해주세요.");
|
||||
return;
|
||||
}
|
||||
|
||||
// 2. 휴대폰 번호 유효성 검사
|
||||
const phoneRegex = /^(010(\d{3}\d{4}|\d{4}\d{4})|011(\d{3}\d{4}|\d{4}\d{4}))$/;
|
||||
if (!phoneRegex.test(certReqPhone)) {
|
||||
alert("유효한 핸드폰 번호를 입력해주세요.");
|
||||
return;
|
||||
}
|
||||
|
||||
var params = {"mbtlnum" : certReqPhone }
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
@ -159,12 +167,46 @@ $(document).ready(function(){
|
||||
|
||||
// IP 추가 버튼 클릭 시 tr 추가
|
||||
$(".btn_ip_plus").click(function () {
|
||||
|
||||
var chk = false;
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/cert/ip/selectMberCertIpList.do",
|
||||
data: null,
|
||||
dataType:'json',
|
||||
async: false,
|
||||
success: function (returnData) {
|
||||
console.log('returnData : ', returnData);
|
||||
if (returnData.status === "OK") {
|
||||
const objects = returnData.object; // 배열 데이터
|
||||
|
||||
// 배열의 개수 구하기
|
||||
const count = objects.length;
|
||||
console.log('count :', count);
|
||||
if(count > 9){
|
||||
alert("접속 IP 등록은 10개까지 가능합니다.");
|
||||
chk = true;
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
alert("데이터를 불러오는 데 실패했습니다.");
|
||||
}
|
||||
},
|
||||
error: function (e) { alert("오류가 발생하였습니다."); console.log("ERROR : ", e); }
|
||||
});
|
||||
|
||||
if(chk){
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
// 추가할 HTML 구조
|
||||
const ipTr = `
|
||||
<tr class="ip-new">
|
||||
<td><input type="text" class="input_text"
|
||||
oninput="this.value = this.value.replace(/[^0-9.]/g, '');" maxlength="15"/></td>
|
||||
<td><input type="text" class="input_text"></td>
|
||||
<td><input type="text" maxLength="25" class="input_text"></td>
|
||||
<td>-</td>
|
||||
<td>
|
||||
<button type="button" class="btnType btnType5" id="ipRegBtn">등록</button>
|
||||
@ -253,7 +295,7 @@ $(document).ready(function(){
|
||||
|
||||
// td 내용을 input 필드로 변경
|
||||
$aliasTd.html('<input type="text" class="input_text" maxlength="12" value="' + aliasValue + '">');
|
||||
$memoTd.html('<input type="text" class="input_text" value="' + memoValue + '">');
|
||||
$memoTd.html('<input type="text" class="input_text" maxlength="25" value="' + memoValue + '">');
|
||||
|
||||
// aliasTd 내의 input 필드에 포커스 설정
|
||||
const $aliasInput = $aliasTd.find('.input_text');
|
||||
@ -262,6 +304,36 @@ $(document).ready(function(){
|
||||
$(this).removeClass("phoneModiBtn").attr("onclick", "fn_phoneSave(this);").text("저장");
|
||||
});
|
||||
|
||||
$(document).on('click', '#phonePlus', function () {
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/cert/phone/selectMberCertPhoneList.do",
|
||||
data: null,
|
||||
dataType:'json',
|
||||
async: false,
|
||||
success: function (returnData) {
|
||||
console.log('returnData : ', returnData);
|
||||
if (returnData.status === "OK") {
|
||||
const objects = returnData.object; // 배열 데이터
|
||||
|
||||
// 배열의 개수 구하기
|
||||
const count = objects.length;
|
||||
console.log('count :', count);
|
||||
if(count < 5){
|
||||
$('#phonePlusPopupOpen').click()
|
||||
}else{
|
||||
alert("인증 휴대폰 번호는 5개까지 등록 가능합니다.");
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
alert("데이터를 불러오는 데 실패했습니다.");
|
||||
}
|
||||
},
|
||||
error: function (e) { alert("오류가 발생하였습니다."); console.log("ERROR : ", e); }
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
findAllCertIp();
|
||||
@ -368,33 +440,43 @@ function findAllCertIp(){
|
||||
// tbody의 기존 내용 삭제
|
||||
const $tbody = $("#ipTable tbody");
|
||||
$tbody.empty();
|
||||
|
||||
// 배열 데이터를 기반으로 tr 생성 후 tbody에 추가
|
||||
$.each(objects, function(index, obj) {
|
||||
const $tr = $("<tr></tr>"); // tr 요소 생성
|
||||
|
||||
// 각 td 요소 생성
|
||||
const $certIp = $("<td></td>").text(obj.certIp || "");
|
||||
const $certMemo = $("<td></td>").text(obj.certMemo || "");
|
||||
const $frstRegistPnttm = $("<td></td>").text(obj.frstRegistPnttm || "등록되지 않음");
|
||||
const $deleteBtn = $("<button></button>")
|
||||
.addClass("btnType btn_text btn_lightgray fill btn_28")
|
||||
.text("삭제")
|
||||
.attr("type", "button")
|
||||
.attr("id", "ipDelBtn")
|
||||
.on("click", function() {
|
||||
deleteRow(obj.certIp); // 삭제 버튼 클릭 시 실행
|
||||
});
|
||||
|
||||
// 관리 버튼을 감쌀 td 생성
|
||||
const $deleteTd = $("<td></td>").append($deleteBtn);
|
||||
|
||||
// tr에 td 추가
|
||||
$tr.append($certIp, $certMemo, $frstRegistPnttm, $deleteTd);
|
||||
|
||||
// tbody에 tr 추가
|
||||
$tbody.append($tr);
|
||||
});
|
||||
if (objects.length === 0) {
|
||||
// 데이터가 없을 때 tr과 td 추가
|
||||
const $emptyRow = $("<tr></tr>").append(
|
||||
$("<td></td>")
|
||||
.attr("colspan", 4)
|
||||
.text("등록된 IP 주소가 없습니다.")
|
||||
.addClass("empty-row") // 스타일을 추가할 경우
|
||||
);
|
||||
$tbody.append($emptyRow);
|
||||
} else {
|
||||
// 배열 데이터를 기반으로 tr 생성 후 tbody에 추가
|
||||
$.each(objects, function(index, obj) {
|
||||
const $tr = $("<tr></tr>"); // tr 요소 생성
|
||||
|
||||
// 각 td 요소 생성
|
||||
const $certIp = $("<td></td>").text(obj.certIp || "");
|
||||
const $certMemo = $("<td></td>").text(obj.certMemo || "");
|
||||
const $frstRegistPnttm = $("<td></td>").text(obj.frstRegistPnttm || "등록되지 않음");
|
||||
const $deleteBtn = $("<button></button>")
|
||||
.addClass("btnType btn_text btn_lightgray fill btn_28")
|
||||
.text("삭제")
|
||||
.attr("type", "button")
|
||||
.attr("id", "ipDelBtn")
|
||||
.on("click", function() {
|
||||
deleteRow(obj.certIp); // 삭제 버튼 클릭 시 실행
|
||||
});
|
||||
|
||||
// 관리 버튼을 감쌀 td 생성
|
||||
const $deleteTd = $("<td></td>").append($deleteBtn);
|
||||
|
||||
// tr에 td 추가
|
||||
$tr.append($certIp, $certMemo, $frstRegistPnttm, $deleteTd);
|
||||
|
||||
// tbody에 tr 추가
|
||||
$tbody.append($tr);
|
||||
});
|
||||
}
|
||||
} else {
|
||||
alert("데이터를 불러오는 데 실패했습니다.");
|
||||
}
|
||||
@ -591,6 +673,13 @@ function callTo() {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function fn_phonePopClean(){
|
||||
console.log('ddd')
|
||||
$('#certReqPhone').val('');
|
||||
$('#certNumber').val('');
|
||||
}
|
||||
|
||||
function linkPage(pageNo){
|
||||
var listForm = document.listForm ;
|
||||
listForm.pageIndex.value = pageNo ;
|
||||
@ -615,7 +704,7 @@ function linkPage(pageNo){
|
||||
<div class="popup-com certify_layer popup05" tabindex="0" data-tooltip-con="popup05" data-focus="popup05" data-focus-prev="popup05-close" style="width: 500px;">
|
||||
<div class="popup_heading">
|
||||
<p>휴대폰 인증</p>
|
||||
<button type="button" class="tooltip-close" data-focus="popup05-close"><img src="/publish/images/content/layerPopup_close.png" alt="팝업 닫기"></button>
|
||||
<button type="button" class="tooltip-close" data-focus="popup05-close" onclick="fn_phonePopClean()"><img src="/publish/images/content/layerPopup_close.png" alt="팝업 닫기"></button>
|
||||
</div>
|
||||
<div class="layer_in">
|
||||
<div class="hascont">
|
||||
@ -640,7 +729,7 @@ function linkPage(pageNo){
|
||||
<th>인증번호</th>
|
||||
<td>
|
||||
<label for="" class="label">인증번호 입력</label>
|
||||
<input type="text" placeholder="인증번호 6자리 입력" id="certNumber" onfocus="this.placeholder=''" onblur="this.placeholder='인증번호 6자리 입력'" class="inputLight" style="width: 200px;">
|
||||
<input type="text" placeholder="인증번호 6자리 입력" id="certNumber" maxlength="7" onfocus="this.placeholder=''" onblur="this.placeholder='인증번호 6자리 입력'" class="inputLight" style="width: 200px;">
|
||||
<button type="button" id="certConfirmBtn" class="btnType btnType6" style="width:90px">확인</button>
|
||||
</td>
|
||||
</tr>
|
||||
@ -733,7 +822,8 @@ function linkPage(pageNo){
|
||||
<p>인증에 사용할 휴대폰번호를 추가로 등록하여 관리할 수 있습니다. <br>
|
||||
(등록 및 삭제 시 휴대폰 본인인증 필요)</p>
|
||||
</div>
|
||||
<button type="button" data-tooltip="popup05" class="btn_plus"><img src="/publish/images/content/mypage_plus.png" alt="더보기"></button>
|
||||
<button type="button" id="phonePlus" class="btn_plus"><img src="/publish/images/content/mypage_plus.png" alt="더보기"></button>
|
||||
<input type="hidden" data-tooltip="popup05" id="phonePlusPopupOpen"/>
|
||||
</div>
|
||||
|
||||
<div class="table_wrap" id="phoneTable">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user