diff --git a/src/assets/css/order/order-place-modal.css b/src/assets/css/order/order-place-modal.css index 850908bd..b0a82f75 100644 --- a/src/assets/css/order/order-place-modal.css +++ b/src/assets/css/order/order-place-modal.css @@ -16,7 +16,6 @@ max-height: 90%; margin: auto; margin-top: 5%; - padding: 2em; background-color: #f5f5f5; border-radius: 15px; box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2); diff --git a/src/components/member/AddressModal.vue b/src/components/member/AddressModal.vue index 9d076b98..9df87cd1 100644 --- a/src/components/member/AddressModal.vue +++ b/src/components/member/AddressModal.vue @@ -76,7 +76,7 @@ const submitForm = async () => { } props.closeModal() - window.location.reload() + await successModal('알림', '배송지 저장이 완료되었습니다.') } catch (error) { console.error('API 호출 중 오류 발생:', error) @@ -207,7 +207,7 @@ watch(() => props.selectedAddress, (newValue: any) => { .modal-card { position: relative; max-width: 30%; - max-height: 90%; + max-height: 95%; margin: auto; margin-top: 1%; background-color: #f5f5f5; @@ -215,7 +215,7 @@ watch(() => props.selectedAddress, (newValue: any) => { box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2); z-index: 10; color: #333; - overflow-y: scroll; + } @@ -283,7 +283,7 @@ td { .post-box { overflow-y: auto; - max-height: 300px; + max-height: 250px; padding: 1em; border: 1px solid #ccc; border-radius: 5px; diff --git a/src/components/member/MemberInfoComponent.vue b/src/components/member/MemberInfoComponent.vue index 409da825..c3395215 100644 --- a/src/components/member/MemberInfoComponent.vue +++ b/src/components/member/MemberInfoComponent.vue @@ -16,15 +16,15 @@ import type { MemberInfoDto } from '@/apis/member/MemberDto' import { deleteAddress } from '@/apis/member/member' import { uploadImageToS3 } from '@/apis/s3/S3Client' import { confirmModal, successModal } from '@/utils/Modal' -import { Select, SelectOption } from 'ant-design-vue' -import type { SelectValue } from 'ant-design-vue/es/select' +import { Select} from 'ant-design-vue' + const isModalVisible = ref(false) const addresses = ref([]) -const memberStore = useMemberStore() -const memberInfo = memberStore.getMemberInfo() +let memberInfo = useMemberStore() + const defaultAddress = ref() const requestPage = ref(0) @@ -38,26 +38,33 @@ const openModal = () => { isModalVisible.value = true } -const closeModal = () => { +const closeModal = async () => { + const response = await getMemberAddress(0); + addresses.value = response.content; isModalVisible.value = false } const setDefault = async (addressId: number) => { - setDefaultAddress(addressId) - window.location.reload() + await setDefaultAddress(addressId) + const response = await getMemberAddress(0) + addresses.value = response.content + defaultAddress.value = await getDefaultAddress(); await successModal('알림', '기본 배송지가 저장되었습니다.') } const deleteAdd = async (addressId: number) => { if (await confirmModal('진행 여부 확인', '정말로 삭제하시겠습니까?')) { - deleteAddress(addressId) - window.location.reload() - await successModal('알림', '배송지가 삭제되었습니다.') - + await deleteAddress(addressId); + const response = await getMemberAddress(0); + addresses.value = response.content; + await successModal('알림', '배송지가 삭제되었습니다.'); } - + + } + + onMounted(async () => { await getMember() const addressData = await getDefaultAddress() @@ -84,6 +91,8 @@ onBeforeMount(async () => { totalElements.value = response.totalElements }) + + watch(requestPage, async (afterPage, beforePage) => { if (afterPage < totalPages.value!) { const response = await getMemberAddress(afterPage) @@ -95,7 +104,6 @@ watch(requestPage, async (afterPage, beforePage) => { onMounted(async () => { await getMember() - const addressData = await getDefaultAddress() defaultAddress.value = await getDefaultAddress() }) @@ -118,9 +126,9 @@ const setMemberInfo = async () => { if (await confirmModal('진행 여부 확인', '수정된 정보를 저장하시겠습니까?')) { setMember(memberDto) await getMember() - window.location.reload() + memberInfo = useMemberStore() await successModal('알림', '수정이 완료되었습니다!') - + } } @@ -135,7 +143,6 @@ const leave = async () => { const fileInput = ref(null) const inputPostImgFile = ref() -const formData = new FormData() const requestImage = ref("") const openFileInput = () => { @@ -157,14 +164,13 @@ const handleFileChange = async (event: Event) => { await uploadImageToS3(imgPreSignedUrl, inputPostImgFile.value) await getMember() - window.location.reload() - } -} -const handleGenderSelectedOptionChange = (value: SelectValue, option: any) => { + + } } +