알림 수신 여부
-
(null)
const previewUrl = ref(null)
const isInvalid = ref(false)
+const isFull = ref(false)
const nameInput = ref(null)
const isModalVisible = ref(false)
@@ -151,7 +152,6 @@ const isWarnningModalVisible = ref(false)
watchEffect(() => {
if (info.value) {
name.value = info.value.name
- agitCheck.value = info.value.notificationSettingInfo.agit
emailCheck.value = info.value.notificationSettingInfo.email
kakaoWorkCheck.value = info.value.notificationSettingInfo.kakaoWork
}
@@ -160,8 +160,13 @@ watchEffect(() => {
const validateName = () => {
const regex = /[!@#$%^&*(),.?":{}|<>]/g
isInvalid.value = regex.test(name.value)
+ if (name.value.length > 10 || name.value.length < 1) {
+ isFull.value = true
+ } else {
+ isFull.value = false
+ }
- if (isInvalid.value) {
+ if (isInvalid.value || isFull.value) {
nextTick(() => {
nameInput.value?.focus()
})
@@ -175,7 +180,6 @@ const handlePwChange = () => {
if (
selectedFile.value ||
info.value.name != name.value ||
- info.value.notificationSettingInfo.agit != agitCheck.value ||
info.value.notificationSettingInfo.kakaoWork != kakaoWorkCheck.value ||
info.value.notificationSettingInfo.email != emailCheck.value
) {
@@ -209,12 +213,11 @@ const handleFileDelete = () => {
}
const handleSubmit = async () => {
- if (isInvalid.value == false) {
+ if (isInvalid.value == false && isFull.value == false) {
const formData = new FormData()
const memberInfo = {
name: name.value,
isProfileImageDeleted: imageDelete.value,
- agitNotification: agitCheck.value,
emailNotification: emailCheck.value,
kakaoWorkNotification: kakaoWorkCheck.value
}
diff --git a/src/components/common/ModalView.vue b/src/components/common/ModalView.vue
index 66fe8b09..2e01aecf 100644
--- a/src/components/common/ModalView.vue
+++ b/src/components/common/ModalView.vue
@@ -26,7 +26,7 @@
+ class="flex text-sm font-bold text-body justify-center whitespace-pre-line text-center">
diff --git a/src/views/LoginView.vue b/src/views/LoginView.vue
index 6a7d24e6..51adcc89 100644
--- a/src/views/LoginView.vue
+++ b/src/views/LoginView.vue
@@ -102,8 +102,21 @@ const handleLogin = async () => {
switch (error.response?.status) {
case 401:
isModalVisible.value = !isModalVisible.value
- messageHeader.value = '일치하는 정보가 없습니다'
- messageBody.value = '닉네임과 비밀번호를 다시 확인해 주세요'
+ console.log(error.response?.data)
+ if (error.response?.data == 'AUTH_015') {
+ messageHeader.value = '정지된 계정입니다'
+ messageBody.value =
+ '로그인 시도 5회 초과로 계정이 정지되었습니다\n30분 후 다시 시도해주세요'
+ } else {
+ messageHeader.value = '일치하는 정보가 없습니다'
+ messageBody.value = '닉네임과 비밀번호를 다시 확인해주세요'
+ }
+ break
+
+ case 404:
+ isModalVisible.value = !isModalVisible.value
+ messageHeader.value = '활성화 되어있지 않은 계정입니다'
+ messageBody.value = '접근 상태를 다시 확인하여주세요'
break
case 500:
@@ -111,6 +124,12 @@ const handleLogin = async () => {
messageHeader.value = '서버에 문제가 발생했습니다'
messageBody.value = '잠시후 다시 이용해주세요'
break
+
+ default:
+ isModalVisible.value = !isModalVisible.value
+ messageHeader.value = '문제가 발생했습니다'
+ messageBody.value = '잠시후 다시 이용해주세요'
+ break
}
}
}
diff --git a/src/views/PwChangeView.vue b/src/views/PwChangeView.vue
index 9feca27f..2a8bae7e 100644
--- a/src/views/PwChangeView.vue
+++ b/src/views/PwChangeView.vue
@@ -31,8 +31,7 @@
:class="[
'block w-full px-4 py-4 border rounded focus:outline-none',
isInvalid ? 'border-red-1' : 'border-border-1'
- ]"
- @blur="validatePassword" />
+ ]" />
@@ -110,7 +109,8 @@ const closeModal = () => {
}
const handleChange = () => {
- if (newPw.value === checkPw.value) {
+ validatePassword()
+ if (isInvalid.value == false && newPw.value === checkPw.value) {
patchPassword(newPw.value)
pwChange()
openModal()