|
@@ -0,0 +1,290 @@
|
|
|
|
|
+<!DOCTYPE html>
|
|
|
|
|
+<html lang="ko"
|
|
|
|
|
+ xmlns:th="http://www.thymeleaf.org"
|
|
|
|
|
+ xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
|
|
|
|
+ layout:decorator="web/common/layout/MypageLayoutWeb">
|
|
|
|
|
+<!--
|
|
|
|
|
+ *******************************************************************************
|
|
|
|
|
+ * @source : MypageCustModifyForm.html
|
|
|
|
|
+ * @desc : 마이페이지 > 회원정보 수정 Page
|
|
|
|
|
+ *============================================================================
|
|
|
|
|
+ * STYLE24
|
|
|
|
|
+ * Copyright(C) 2021 TSIT, All rights reserved.
|
|
|
|
|
+ *============================================================================
|
|
|
|
|
+ * VER DATE AUTHOR DESCRIPTION
|
|
|
|
|
+ * === =========== ========== =============================================
|
|
|
|
|
+ * 1.0 2021.03.15 jsshin 최초 작성
|
|
|
|
|
+ *******************************************************************************
|
|
|
|
|
+ -->
|
|
|
|
|
+<body>
|
|
|
|
|
+<th:block layout:fragment="content">
|
|
|
|
|
+ <div class="my_cont">
|
|
|
|
|
+ <div class="sec_head">
|
|
|
|
|
+ <h3>회원정보 수정</h3>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="sec_body mypage_body">
|
|
|
|
|
+ <form id="custModiFyForm" class="form_wrap" role="form" method="post">
|
|
|
|
|
+ <div class="order_list">
|
|
|
|
|
+ <section class="order_row">
|
|
|
|
|
+ <div class="order_tit">
|
|
|
|
|
+ <h3 class="subH3">회원정보</h3>
|
|
|
|
|
+ <button type="button" class="btn_popup" onclick="cfnOpenCellphoneCertify();">개명 본인인증</button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="tbl type1 info_tbl">
|
|
|
|
|
+ <!-- 인증회원 -->
|
|
|
|
|
+ <table>
|
|
|
|
|
+ <colgroup>
|
|
|
|
|
+ <col width="200">
|
|
|
|
|
+ <col width="*">
|
|
|
|
|
+ </colgroup>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <th>이름(성별)</th>
|
|
|
|
|
+ <td id="custNm" name="custNm"></td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <th>생년월일</th>
|
|
|
|
|
+ <td id="birthYmd" name="birthYmd"></td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ </table>
|
|
|
|
|
+ <!-- //인증회원 -->
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <p class="alert_t">본인인증을 통해 자동으로 수집되는 정보 입니다.</p>
|
|
|
|
|
+ </section>
|
|
|
|
|
+ <section class="order_row">
|
|
|
|
|
+ <div class="tbl type1 info_tbl ">
|
|
|
|
|
+ <table>
|
|
|
|
|
+ <colgroup>
|
|
|
|
|
+ <col width="200">
|
|
|
|
|
+ <col width="*">
|
|
|
|
|
+ </colgroup>
|
|
|
|
|
+ <tbody>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <th>아이디</th>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <input type="text" id="custId" name="custId" class="form_control" placeholder="" readonly="readonly"/>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <th>비밀번호</th>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <div class="password_btn">
|
|
|
|
|
+ <button type="button" class="btn btn_dark"><span>변경하기</span></button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <th>이메일</th>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <input type="text" id="email" name="email" class="form_control" placeholder="" readonly="readonly"/>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <th>휴대폰 번호</th>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <input type="text" id="cellPhnno" name="cellPhnno" class="form_control" placeholder="" readonly="readonly"/>
|
|
|
|
|
+ <button type="button" class="btn btn_default btn_sm" onclick="cfnOpenCellphoneCertify();">
|
|
|
|
|
+ <span>휴대폰 인증</span>
|
|
|
|
|
+ </button>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ </tbody>
|
|
|
|
|
+ </table>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </section>
|
|
|
|
|
+ <section class="order_row">
|
|
|
|
|
+ <div class="order_tit">
|
|
|
|
|
+ <h3 class="subH3">환불계좌 정보</h3>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="tbl type1 info_tbl ">
|
|
|
|
|
+ <table>
|
|
|
|
|
+ <colgroup>
|
|
|
|
|
+ <col width="200">
|
|
|
|
|
+ <col width="*">
|
|
|
|
|
+ </colgroup>
|
|
|
|
|
+ <tbody>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <th class="ver_top">예금주</th>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <input type="text" id="accountHolder" name="accountHolder" class="form_control" placeholder="" readonly="readonly"/>
|
|
|
|
|
+ <p class="alert_t02">회원명 본인이 예금주인 통장으로만 환불이 가능합니다.</p>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <th>은행명</th>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <div class="form_field">
|
|
|
|
|
+ <select id="bankList">
|
|
|
|
|
+ <option value="">선택</option>
|
|
|
|
|
+ <option th:if="${bankList}" th:each="oneData, status : ${bankList}" th:value="${oneData.cd}" th:text="${oneData.cdNm}"></option>
|
|
|
|
|
+ </select>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <th>계좌번호</th>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <input type="text" id="accountNumber" name="accountNumber" class="form_control" value="" placeholder=""/>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ </tbody>
|
|
|
|
|
+ </table>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </section>
|
|
|
|
|
+ <section class="order_row">
|
|
|
|
|
+ <div class="order_tit">
|
|
|
|
|
+ <h3 class="subH3">마케팅 정보 수신설정</h3>
|
|
|
|
|
+ <span class="desc">특가상품, 할인쿠폰, 이벤트 소식 수신 동의</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="tbl type1 info_tbl">
|
|
|
|
|
+ <table>
|
|
|
|
|
+ <colgroup>
|
|
|
|
|
+ <col width="200">
|
|
|
|
|
+ <col width="*">
|
|
|
|
|
+ </colgroup>
|
|
|
|
|
+ <tbody>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <th>수신설정</th>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <div class="form_field review_radio">
|
|
|
|
|
+ <div class="radio_li">
|
|
|
|
|
+ <input type="checkbox" id="emailAgreeYn" name="emailAgreeYn" value="Y"/><label for="emailAgreeYn"><span>이메일</span></label>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="radio_li">
|
|
|
|
|
+ <input type="checkbox" id="smsAgreeYn" name="smsAgreeYn" value="Y"/><label for="smsAgreeYn"><span>SMS</span></label>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ </tbody>
|
|
|
|
|
+ </table>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <p class="alert_t"> 회원정보, 구매정보 및 서비스 주요 정책 관련 내용은 수신동의 여부와 관계없이 발송됩니다.</p>
|
|
|
|
|
+ </section>
|
|
|
|
|
+ <div class="btn_wrap half mt60">
|
|
|
|
|
+ <button type="button" id="btnConfirm" class="btn btn_dark submit_btn">
|
|
|
|
|
+ <span>확인</span>
|
|
|
|
|
+ </button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </form>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+<script th:inline="javascript">
|
|
|
|
|
+ /*<![CDATA[*/
|
|
|
|
|
+
|
|
|
|
|
+ var fnConvertToArray = function(data, isCodeDisplay) {
|
|
|
|
|
+ if (data.length == 0)
|
|
|
|
|
+ return [];
|
|
|
|
|
+
|
|
|
|
|
+ if (typeof(isCodeDisplay) == 'undefined')
|
|
|
|
|
+ isCodeDisplay = false;
|
|
|
|
|
+
|
|
|
|
|
+ var arrValue = {};
|
|
|
|
|
+
|
|
|
|
|
+ $.each(data, function(idx, item) {
|
|
|
|
|
+ arrValue[item.cd] = (isCodeDisplay ? '[' + item.cd + '] ' : '') + item.cdNm;
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ return arrValue;
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ var fnLookupValue = function(mappings, key) {
|
|
|
|
|
+ return mappings[key];
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ const genderGbList = fnConvertToArray([[${genderGbList}]]); //성별
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ // 고객정보
|
|
|
|
|
+ var fnGetCustInfo = function () {
|
|
|
|
|
+ let jsonData = JSON.stringify({});
|
|
|
|
|
+ gagajf.ajaxJsonSubmit("/mypage/customer/info", jsonData , fnGetCustInfoCallback);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 고객정보 데이터
|
|
|
|
|
+ var fnGetCustInfoCallback = function (custInfo) {
|
|
|
|
|
+ let genderGb = fnLookupValue(genderGbList, custInfo.sexGb);
|
|
|
|
|
+ let gender = '';
|
|
|
|
|
+ if (!gagajf.isNull(genderGb)) {
|
|
|
|
|
+ gender = custInfo.custNm + '('+ genderGb +')';
|
|
|
|
|
+ } else {
|
|
|
|
|
+ gender = genderGb;
|
|
|
|
|
+ }
|
|
|
|
|
+ $('#custModiFyForm td[name=custNm]').text(gender);
|
|
|
|
|
+ $('#custModiFyForm td[name=birthYmd]').text(custInfo.birthYmd);
|
|
|
|
|
+ $('#custModiFyForm input[name=custId]').val(custInfo.custId);
|
|
|
|
|
+ $('#custModiFyForm input[name=email]').val(custInfo.email);
|
|
|
|
|
+ $('#custModiFyForm input[name=cellPhnno]').val(custInfo.cellPhnno);
|
|
|
|
|
+ $('#custModiFyForm input[name=accountHolder]').val(custInfo.custNm);
|
|
|
|
|
+
|
|
|
|
|
+ fnDisplayEmailAgree(custInfo.emailAgreeYn);
|
|
|
|
|
+ fnDisplaySmsAgree(custInfo.smsAgreeYn);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 이메일 수신동의
|
|
|
|
|
+ var fnDisplayEmailAgree = function (emailAgreeYn) {
|
|
|
|
|
+ const $emailAgreeYn = $('#custModiFyForm input[name=emailAgreeYn]');
|
|
|
|
|
+ if (emailAgreeYn === 'Y') {
|
|
|
|
|
+ $emailAgreeYn.prop('checked', true);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ $emailAgreeYn.prop('checked', false);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ // SMS 수신동의
|
|
|
|
|
+ var fnDisplaySmsAgree = function (smsAgreeYn) {
|
|
|
|
|
+ const $smsAgreeYn = $('#custModiFyForm input[name=smsAgreeYn]');
|
|
|
|
|
+ if (smsAgreeYn === 'Y') {
|
|
|
|
|
+ $smsAgreeYn.prop('checked', true);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ $smsAgreeYn.prop('checked', false);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ // 나이스 본인인증 후 콜백
|
|
|
|
|
+ var fnNiceCallBack = function(encData) {
|
|
|
|
|
+ if (!gagajf.isNull(encData)) {
|
|
|
|
|
+ let custInfo = {};
|
|
|
|
|
+ custInfo.encData = encData;
|
|
|
|
|
+ let jsonData = JSON.stringify(custInfo);
|
|
|
|
|
+ gagajf.ajaxJsonSubmit('/mypage/customer/auth/update', jsonData, fnInfoConfirmCallBack);
|
|
|
|
|
+ }
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ var fnInfoConfirmCallBack = function (result) {
|
|
|
|
|
+ if (result.iSsuccess) {
|
|
|
|
|
+ fnGetCustInfo();
|
|
|
|
|
+ mcxDialog.alert("본인인증을 통해 정보가 변경 되었습니다.");
|
|
|
|
|
+ return;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ mcxDialog.alert("실패하였습니다.<br/>고객센터에 문의하시 바랍니다.");
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ $('#btnConfirm').on('click', function () {
|
|
|
|
|
+ let jsonData = JSON.stringify($('#custModiFyForm').serializeObject());
|
|
|
|
|
+ console.log('jsonData', jsonData);
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ $(document).ready(function() {
|
|
|
|
|
+ // 마이페이지 LNB 설정
|
|
|
|
|
+ fnSetMypageLnbList(10);
|
|
|
|
|
+
|
|
|
|
|
+ // 마이페이지 location 설정
|
|
|
|
|
+ fnSetMypageLocation('회원정보 수정');
|
|
|
|
|
+
|
|
|
|
|
+ // 회원정보 조회
|
|
|
|
|
+ fnGetCustInfo();
|
|
|
|
|
+
|
|
|
|
|
+ });
|
|
|
|
|
+ /*]]>*/
|
|
|
|
|
+</script>
|
|
|
|
|
+</th:block>
|
|
|
|
|
+</body>
|
|
|
|
|
+</html>
|
|
|
|
|
+
|
|
|
|
|
+
|