From 60ee25564b3cc2db60a2e9d1f00816abfed3093f Mon Sep 17 00:00:00 2001 From: Yu Sung Date: Thu, 5 Mar 2026 15:53:14 +0900 Subject: [PATCH] =?UTF-8?q?feat(member-block):=20=EA=B3=84=EC=A0=95=20?= =?UTF-8?q?=EB=B0=8F=20=EB=B3=B8=EC=9D=B8=EC=9D=B8=EC=A6=9D=20=EC=A0=95?= =?UTF-8?q?=EB=B3=B4=20=EC=B0=A8=EB=8B=A8=20=EA=B8=B0=EB=8A=A5=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80=20=EC=99=84=EB=A3=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/member.js | 14 +++- src/views/Member/MemberList.vue | 125 +++++++++++++++++++++++++++++++- 2 files changed, 134 insertions(+), 5 deletions(-) diff --git a/src/api/member.js b/src/api/member.js index ba5c420..8796589 100644 --- a/src/api/member.js +++ b/src/api/member.js @@ -52,6 +52,11 @@ async function resetPassword(id) { return Vue.axios.post("/admin/member/password/reset", request) } +async function blockMember(memberId, reason) { + const request = {memberId, reason} + return Vue.axios.post("/admin/member/block", request) +} + /** * 닉네임으로 회원 검색 API * - 서버 구현 차이를 흡수하기 위해 nickname, search_word 두 파라미터 모두 전송 @@ -84,8 +89,9 @@ export { searchMember, getCreatorList, searchCreator, - updateMember, - getCreatorAllList, - resetPassword, - searchMembersByNickname + updateMember, + getCreatorAllList, + resetPassword, + blockMember, + searchMembersByNickname } diff --git a/src/views/Member/MemberList.vue b/src/views/Member/MemberList.vue index ffec5dd..07dfac1 100644 --- a/src/views/Member/MemberList.vue +++ b/src/views/Member/MemberList.vue @@ -193,6 +193,14 @@ + + 차단 + + 비밀번호 재설정 - + + + + + 차단(탈퇴) 사유 입력 + + + + + + + 차단 + + + 취소 + + + + + + + + + + + '{{ nickname }}' 계정과 본인인증 정보, 같은 본인인증 정보를 사용하는 모든 계정을 차단합니다. + + + + + 차단 + + + 취소 + + + + + @@ -274,6 +349,9 @@ export default { user_type: null, show_popup_dialog: false, show_confirm_reset_password_dialog: false, + show_block_reason_dialog: false, + show_confirm_block_dialog: false, + block_reason: '', } }, @@ -382,6 +460,51 @@ export default { this.user_type = null this.show_popup_dialog = false this.show_confirm_reset_password_dialog = false + this.show_block_reason_dialog = false + this.show_confirm_block_dialog = false + this.block_reason = '' + }, + + showBlockReasonDialog() { + this.show_popup_dialog = false + this.show_block_reason_dialog = true + }, + + cancelBlock() { + this.show_block_reason_dialog = false + this.show_confirm_block_dialog = false + this.block_reason = '' + this.show_popup_dialog = true + }, + + confirmBlock() { + if (this.block_reason.length === 0) { + this.notifyError('차단 사유를 입력해주세요.') + return + } + this.show_block_reason_dialog = false + this.show_confirm_block_dialog = true + }, + + async blockMember() { + this.is_loading = true + try { + const res = await api.blockMember(this.member.id, this.block_reason) + if (res.status === 200 && res.data.success === true) { + this.notifySuccess('차단되었습니다.') + 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 + } }, async modify() {