From f2f022531d1b05fbd3383c4a2a442064766c6724 Mon Sep 17 00:00:00 2001 From: Yu Sung Date: Mon, 17 Mar 2025 11:48:53 +0900 Subject: [PATCH] =?UTF-8?q?=EB=B9=84=EB=B0=80=EB=B2=88=ED=98=B8=20?= =?UTF-8?q?=EC=9E=AC=EC=84=A4=EC=A0=95=20=EA=B8=B0=EB=8A=A5=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/member.js | 8 +++- src/views/Member/MemberList.vue | 70 ++++++++++++++++++++++++++++++++- 2 files changed, 76 insertions(+), 2 deletions(-) diff --git a/src/api/member.js b/src/api/member.js index 4da6e87..d2abd61 100644 --- a/src/api/member.js +++ b/src/api/member.js @@ -47,6 +47,11 @@ async function getCreatorAllList() { return Vue.axios.get("/admin/member/creator/all/list") } +async function resetPassword(id) { + const request = {memberId: id} + return Vue.axios.post("/admin/member/password/reset", request) +} + export { login, getMemberList, @@ -54,5 +59,6 @@ export { getCreatorList, searchCreator, updateMember, - getCreatorAllList + getCreatorAllList, + resetPassword } diff --git a/src/views/Member/MemberList.vue b/src/views/Member/MemberList.vue index 9e9b94a..d8e0630 100644 --- a/src/views/Member/MemberList.vue +++ b/src/views/Member/MemberList.vue @@ -189,6 +189,13 @@ + + 비밀번호 재설정 + + + + + + + {{ nickname }}님의 비밀번호를 재설정 하시겠습니까? + + + + + 비밀번호 재설정 + + + + 취소 + + + + + + @@ -228,7 +268,8 @@ export default { email: null, nickname: null, user_type: null, - show_popup_dialog: false + show_popup_dialog: false, + show_confirm_reset_password_dialog: false, } }, @@ -336,6 +377,7 @@ export default { this.nickname = null this.user_type = null this.show_popup_dialog = false + this.show_confirm_reset_password_dialog = false }, async modify() { @@ -366,6 +408,32 @@ export default { this.is_loading = false this.cancel() + }, + + confirmResetPassword() { + this.show_popup_dialog = false + this.show_confirm_reset_password_dialog = true + }, + + async resetPassword() { + this.is_loading = true + try { + const res = await api.resetPassword(this.member.id) + if (res.status === 200 && res.data.success === true) { + this.notifySuccess(res.data.message) + this.cancel() + + this.page = 1 + await this.getMemberList() + } else { + this.notifyError(res.data.message || '알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.') + } + + this.is_loading = false + } catch (e) { + this.notifyError('알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.') + this.is_loading = false + } } } } -- 2.40.1