-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMYPAGE01.html
178 lines (155 loc) · 6.5 KB
/
MYPAGE01.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" href="img/Logo.png" type="image/png">
<link rel="stylesheet" href="main.css">
<title>회원상세</title>
</head>
<body>
<nav class="top-nav">
<div class="nav-container">
<div class="logo-area">
<img src="img/Logo.png" alt="Logo" class="logo">
<img src="img/letters.svg" alt="Letters" class="letters">
</div>
<div class="login-area">
<span class="login-text" id="loginText" style="display: none;" >로그인</span>
<div class="user-info" id="userInfo">
<img src="img/profile.svg" alt="프로필" class="profile-icon">
<span class="user-name">사용자 이름</span>
</div>
</div>
</div>
</nav>
<main class="main-my">
<div class="main2nd-my">
<div class="my-header">
<div class="my-title">내 정보</div>
<div class="my-container">
<div class="my-row">
<div class="my-label">아이디</div>
<div class="my-box">
<span>[email protected]</span>
<button class="button1-my" onclick="openPasswordModal()">비밀번호 변경</button>
</div>
</div>
<div class="my-row">
<div class="my-label">이름</div>
<div class="my-box">김우빈</div>
</div>
<div class="my-row">
<div class="my-label">라이선스</div>
<div class="my-box"><span>2024.12.20 - 2025.12.19 </span></div>
</div>
<div class="my-row">
<div class="my-label">소속 병원</div>
<div class="my-vbox"><span>한빛소아과</span>
<div class="desc-my">소속 병원 정보는 라이선스에 부여되어 있습니다. 수정하려면 고객센터로 문의해주세요.<br>[email protected] 또는 1500-0000</div>
</div>
</div>
<div><button class="button2-my" onclick="openDelaccountModal()">탈퇴하기</button></div>
</div>
</div>
</div>
</main>
<!-- 비밀번호 변경 모달 -->
<div id="password-modal" class="modal" style="display: none;">
<div class="modal-content">
<div class="h2">비밀번호 변경</div>
<label class="password">현재 비밀번호</label>
<input type="password" id="current-password" class="styled-input" placeholder="현재 비밀번호 입력">
<label class="password">새 비밀번호</label>
<input type="password" id="new-password" class="styled-input" placeholder="새 비밀번호 입력">
<label class="password">새 비밀번호 확인</label>
<input type="password" id="confirm-password" class="styled-input" placeholder="새 비밀번호 확인">
<div class="modal-actions">
<button class="cancel-button" onclick="closePasswordModal()">취소</button>
<button class="confirm-button" onclick="changePassword()">저장</button>
</div>
</div>
</div>
<!--계정 삭제 모달 -->
<div id="delaccount-modal" class="modal" style="display: none;">
<div class="modal-content">
<div class="h2">정말로 탈퇴하시겠습니까?</div>
<div class="input-label"> 탈퇴하기 버튼 선택 시 고객센터에 전달됩니다. <br>탈퇴 이후의 데이터는 복구할 수 없습니다.</div>
<div class="modal-actions">
<button class="cancel-button" onclick="closeDelaccountModal()">취소</button>
<button class="button2-my">탈퇴하기</button>
</div>
</div>
</div>
<script src="path/to/your-script.js"></script>
<script>
// 모든 모달 닫기
function closeAllModals() {
const modals = document.querySelectorAll('.modal');
modals.forEach((modal) => {
modal.style.display = 'none'; // 모든 모달 숨김
});
}
function openPasswordModal() {
document.getElementById('password-modal').style.display = 'flex'; // 모달 열기
}
function closePasswordModal() {
document.getElementById('password-modal').style.display = 'none'; // 모달 닫기
}
function changePassword() {
const currentPassword = document.getElementById('current-password').value;
const newPassword = document.getElementById('new-password').value;
const confirmPassword = document.getElementById('confirm-password').value;
if (!currentPassword || !newPassword || !confirmPassword) {
alert('모든 필드를 입력하세요.');
return;
}
if (newPassword !== confirmPassword) {
alert('새 비밀번호가 일치하지 않습니다.');
return;
}
// 서버와 통신하는 로직을 추가하세요.
alert('비밀번호가 변경되었습니다.');
closePasswordModal(); // 모달 닫기
}
// 라이선스 삭제 모달 열기 및 닫기
function openLicenseDelModal() {
closeAllModals(); // 다른 모달 닫기
const modal = document.getElementById('licensedel-modal');
if (modal) {
modal.style.display = 'flex'; // 라이선스 삭제 모달 열기
} else {
console.error('licensedel-modal element not found!');
}
}
// 라이선스 삭제 모달 닫기
function closeLicenseDelModal() {
const modal = document.getElementById('licensedel-modal');
if (modal) {
modal.style.display = 'none'; // 라이선스 삭제 모달 닫기
} else {
console.error('licensedel-modal element not found!');
}
}
// 계정 삭제 모달 열기
function openDelaccountModal() {
closeAllModals(); // 다른 모달 닫기
const modal = document.getElementById('delaccount-modal');
if (modal) {
modal.style.display = 'flex'; // 계정 삭제 모달 열기
} else {
console.error('delaccount-modal element not found!');
}
}
// 계정 삭제 모달 닫기
function closeDelaccountModal() {
const modal = document.getElementById('delaccount-modal');
if (modal) {
modal.style.display = 'none'; // 계정 삭제 모달 닫기
} else {
console.error('delaccount-modal element not found!');
}
}
</script>
</body>
</html>