비밀번호 재설정 기능 추가 #63
@@ -47,6 +47,11 @@ async function getCreatorAllList() {
 | 
				
			|||||||
    return Vue.axios.get("/admin/member/creator/all/list")
 | 
					    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 {
 | 
					export {
 | 
				
			||||||
    login,
 | 
					    login,
 | 
				
			||||||
    getMemberList,
 | 
					    getMemberList,
 | 
				
			||||||
@@ -54,5 +59,6 @@ export {
 | 
				
			|||||||
    getCreatorList,
 | 
					    getCreatorList,
 | 
				
			||||||
    searchCreator,
 | 
					    searchCreator,
 | 
				
			||||||
    updateMember,
 | 
					    updateMember,
 | 
				
			||||||
    getCreatorAllList
 | 
					    getCreatorAllList,
 | 
				
			||||||
 | 
					    resetPassword
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -189,6 +189,13 @@
 | 
				
			|||||||
            </v-row>
 | 
					            </v-row>
 | 
				
			||||||
          </v-card-text>
 | 
					          </v-card-text>
 | 
				
			||||||
          <v-card-actions v-show="!is_loading">
 | 
					          <v-card-actions v-show="!is_loading">
 | 
				
			||||||
 | 
					            <v-btn
 | 
				
			||||||
 | 
					              color="blue darken-1"
 | 
				
			||||||
 | 
					              text
 | 
				
			||||||
 | 
					              @click="confirmResetPassword"
 | 
				
			||||||
 | 
					            >
 | 
				
			||||||
 | 
					              비밀번호 재설정
 | 
				
			||||||
 | 
					            </v-btn>
 | 
				
			||||||
            <v-spacer />
 | 
					            <v-spacer />
 | 
				
			||||||
            <v-btn
 | 
					            <v-btn
 | 
				
			||||||
              color="blue darken-1"
 | 
					              color="blue darken-1"
 | 
				
			||||||
@@ -208,6 +215,39 @@
 | 
				
			|||||||
        </v-card>
 | 
					        </v-card>
 | 
				
			||||||
      </v-dialog>
 | 
					      </v-dialog>
 | 
				
			||||||
    </v-row>
 | 
					    </v-row>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <v-row>
 | 
				
			||||||
 | 
					      <v-dialog
 | 
				
			||||||
 | 
					        v-model="show_confirm_reset_password_dialog"
 | 
				
			||||||
 | 
					        max-width="400px"
 | 
				
			||||||
 | 
					        persistent
 | 
				
			||||||
 | 
					      >
 | 
				
			||||||
 | 
					        <v-card>
 | 
				
			||||||
 | 
					          <v-card-title>
 | 
				
			||||||
 | 
					            {{ nickname }}님의 비밀번호를 재설정 하시겠습니까?
 | 
				
			||||||
 | 
					          </v-card-title>
 | 
				
			||||||
 | 
					          <v-card-actions v-show="!is_loading">
 | 
				
			||||||
 | 
					            <v-spacer />
 | 
				
			||||||
 | 
					            <v-btn
 | 
				
			||||||
 | 
					              color="blue darken-1"
 | 
				
			||||||
 | 
					              text
 | 
				
			||||||
 | 
					              @click="resetPassword"
 | 
				
			||||||
 | 
					            >
 | 
				
			||||||
 | 
					              비밀번호 재설정
 | 
				
			||||||
 | 
					            </v-btn>
 | 
				
			||||||
 | 
					            <v-spacer />
 | 
				
			||||||
 | 
					            <v-btn
 | 
				
			||||||
 | 
					              color="blue darken-1"
 | 
				
			||||||
 | 
					              text
 | 
				
			||||||
 | 
					              @click="cancel"
 | 
				
			||||||
 | 
					            >
 | 
				
			||||||
 | 
					              취소
 | 
				
			||||||
 | 
					            </v-btn>
 | 
				
			||||||
 | 
					            <v-spacer />
 | 
				
			||||||
 | 
					          </v-card-actions>
 | 
				
			||||||
 | 
					        </v-card>
 | 
				
			||||||
 | 
					      </v-dialog>
 | 
				
			||||||
 | 
					    </v-row>
 | 
				
			||||||
  </div>
 | 
					  </div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -228,7 +268,8 @@ export default {
 | 
				
			|||||||
      email: null,
 | 
					      email: null,
 | 
				
			||||||
      nickname: null,
 | 
					      nickname: null,
 | 
				
			||||||
      user_type: 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.nickname = null
 | 
				
			||||||
      this.user_type = null
 | 
					      this.user_type = null
 | 
				
			||||||
      this.show_popup_dialog = false
 | 
					      this.show_popup_dialog = false
 | 
				
			||||||
 | 
					      this.show_confirm_reset_password_dialog = false
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    async modify() {
 | 
					    async modify() {
 | 
				
			||||||
@@ -366,6 +408,32 @@ export default {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
      this.is_loading = false
 | 
					      this.is_loading = false
 | 
				
			||||||
      this.cancel()
 | 
					      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
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user