Skip to content

Commit

Permalink
Merge pull request #221 from lotteon2/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
wakkpu authored Jan 18, 2024
2 parents 9a5aece + c506b94 commit 36e9ff8
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 27 deletions.
1 change: 0 additions & 1 deletion src/assets/css/order/order-place-modal.css
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
8 changes: 4 additions & 4 deletions src/components/member/AddressModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ const submitForm = async () => {
}
props.closeModal()
window.location.reload()
await successModal('알림', '배송지 저장이 완료되었습니다.')
} catch (error) {
console.error('API 호출 중 오류 발생:', error)
Expand Down Expand Up @@ -207,15 +207,15 @@ 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;
border-radius: 15px;
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
z-index: 10;
color: #333;
overflow-y: scroll;
}
Expand Down Expand Up @@ -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;
Expand Down
48 changes: 27 additions & 21 deletions src/components/member/MemberInfoComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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<number>(0)
Expand All @@ -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()
Expand All @@ -84,6 +91,8 @@ onBeforeMount(async () => {
totalElements.value = response.totalElements
})
watch(requestPage, async (afterPage, beforePage) => {
if (afterPage < totalPages.value!) {
const response = await getMemberAddress(afterPage)
Expand All @@ -95,7 +104,6 @@ watch(requestPage, async (afterPage, beforePage) => {
onMounted(async () => {
await getMember()
const addressData = await getDefaultAddress()
defaultAddress.value = await getDefaultAddress()
})
Expand All @@ -118,9 +126,9 @@ const setMemberInfo = async () => {
if (await confirmModal('진행 여부 확인', '수정된 정보를 저장하시겠습니까?')) {
setMember(memberDto)
await getMember()
window.location.reload()
memberInfo = useMemberStore()
await successModal('알림', '수정이 완료되었습니다!')
}
}
Expand All @@ -135,7 +143,6 @@ const leave = async () => {
const fileInput = ref<HTMLInputElement | null>(null)
const inputPostImgFile = ref<File>()
const formData = new FormData()
const requestImage = ref<string>("")
const openFileInput = () => {
Expand All @@ -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) => {
}
}
</script>

<template>
Expand All @@ -186,7 +192,7 @@ const handleGenderSelectedOptionChange = (value: SelectValue, option: any) => {
<circle cx='75' cy='75' r='75' fill='white' />
</mask>
<image
:href='`${VITE_STATIC_IMG_URL}${memberInfo.profileImgUrl}` || undefined'
:href='`${VITE_STATIC_IMG_URL}${memberInfo.profileImgUrl}?${new Date().getTime()}` || undefined'
x='0'
y='0'
width='150'
Expand Down
2 changes: 1 addition & 1 deletion src/views/ProductListView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ const getProductMaxDiscountPercentage = (product: ReadProductResponse) => {
/>
<h1>{{ product.brandName }}</h1>
<h2>{{ product.name }}</h2>
<PriceDisplay
<ProductListPriceDisplay
:original-price="product.price"
:discount-percentage="getFloorDiscountPercentage(product)"
:final-price="getFinalPrice(product)"
Expand Down

0 comments on commit 36e9ff8

Please sign in to comment.