YNICTE/FO/Views/Shared/Partial/MobileChk.cshtml

101 lines
4.3 KiB
Plaintext
Raw Normal View History

2020-12-14 10:27:53 +09:00
@model NP.Model.VMUser
@{
var _method = ViewData["bindmethod"].ToString();
}
<div class="clsPop" id="mobilechk">
<div>
<div>
<div class="clsPopWrap">
<div class="clsPopTitle"><h5>본인인증</h5><a href="#" onclick="mobilechkclose()"></a></div>
<div class="clsPopCont">
<form id="fform" method="post" enctype="multipart/form-data">
<div id="boxassignnewdata">
<p class="clspNon" style="padding-bottom:10px;">인증요청한 휴대번호 : <span id="boxmobile"></span></p>
<p class="clspNon" style="padding-top:10px;">핸드폰으로 전송된 인증번호 6자리를 입력하신 후 확인버튼을 눌러주세요.</p>
<div class="clspInput" style="padding-bottom:10px;">
<input type="text" class="int nocomma" style="width:auto;" maxlength="6" id="mobile_lakey" name="lakey" placeholder="인증번호를 입력" />
<input type="button" value="재전송" onclick="resendlakey()" />
</div>
<div class="clspInput">
<span id="lblrtime">(남은 시간 0분 00초)</span>
<input type="button" value="시간연장" onclick="pluslearnauthtime()" />
</div>
</div>
<div class="clspInput">
<input type="button" style="background:#878787;" class="btn-find" value="확인" onclick="chklakey()" />
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<script>
$(document).ready(function () {
});
var _vd_tm1;
var _vd_tmsec;
function mobilechkclose() {
clearInterval(_vd_tm1);
$("#mobilechk").slideUp("fast");
}
var mobile;
function mobilechkview() {
$("#mobile_lakey").val("");
if ($("#mobile").val() != "") {
mobile = $("#mobile").val();
}
$("#boxmobile").text(mobile);
$("#mobilechk").slideDown("fast");
clearInterval(_vd_tm1);
_vd_tmsec = 180;
_vd_tm1 = setInterval(sendlatimer, 1000);
}
function resendlakey() {
$("#lblrtime").text("(남은 시간 3분 00초)");
clearInterval(_vd_tm1);
_vd_tmsec = 180;
_vd_tm1 = setInterval(sendlatimer, 1000);
msg("인증번호를 재전송하였습니다.");
capp("/focommon/sendlakey", { lectno: $("#mastercroomlectno").val(), mobile: mobile }, "sendkey");
}
function sendlatimer() {
_vd_tmsec--;
if (_vd_tmsec < 1) {
clearInterval(_vd_tm1);
msg("유효시간이 만료되었습니다.<br/>창을 닫고 다시 진행해주세요.");
mobilechkclose();
}
if (_vd_tmsec > 59) {
$("#lblrtime").text("(남은 시간 " + (parseInt(_vd_tmsec / 60)) + "분 " + (_vd_tmsec % 60) + "초)");
} else {
$("#lblrtime").text("(남은 시간 " + (_vd_tmsec) + "초)");
}
}
var authno = 0;
function pluslearnauthtime() {
clearInterval(_vd_tm1);
_vd_tmsec = 180;
_vd_tm1 = setInterval(sendlatimer, 1000);
capp("/focommon/extendlakey", { authno: authno }, "extlakey");
}
function extlakey() {
msg("인증시간 연장");
}
function sendkey() {
if (capResult.obj > 0) {
//msg("인증코드 발송");
authno = capResult.obj;
mobilechkview();
} else if (capResult.code == -1) {
msg("해당 번호로 등록한 회원이 두명이상입니다.<br/>운영자에게 문의해주시기 바랍니다.");
} else if (capResult.code == -2) {
msg("해당 번호로 등록한 회원이 없습니다.");
}else {
msg("발송실패, 인증코드를 재전송해주세요.");
}
}
function chklakey() {
capp("/focommon/chklakeyforlectinning", { lakey: $("#mobile_lakey").val(), authno: authno, cmino:_cmino }, "@(_method)");
2020-12-14 10:27:53 +09:00
}
</script>