Skip to content

Commit

Permalink
Merge pull request #312 from ssg-java3-240304/develop
Browse files Browse the repository at this point in the history
Merge Master 2024년 8월 30일
  • Loading branch information
jyna120 authored Aug 30, 2024
2 parents cc1560a + f4c3f00 commit e8ca554
Show file tree
Hide file tree
Showing 7 changed files with 114 additions and 38 deletions.
18 changes: 15 additions & 3 deletions src/main/resources/templates/auction/auction.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,30 @@
var url = '/auction/product/' + productId;
window.location.href = url;
}

// 금액에 쉼표 추가
function formatNumber(number) {
return number.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
}

// 경매 등록, 참여 내역 금액에 쉼표 추가
window.onload = function() {
document.querySelectorAll('.price').forEach(function(element) {
element.innerText = formatNumber(element.innerText);
});
};
</script>
</head>
<body>
<div layout:fragment="content1">
<div class="breadcrumb breadcrumb-style-one mb-0">
<div class="container">
<div class="col-lg-12 text-center">
<h1 class="breadcrumb-title">경매 목록</h1>
<h1 class="breadcrumb-title">Auction</h1>
<ul class="d-flex justify-content-center breadcrumb-items">
<li class="breadcrumb-item"><i class="bi bi-house-door"></i> <a th:href="@{/}">Home</a>
</li>
<li class="breadcrumb-item active">경매 목록</li>
<li class="breadcrumb-item active">Auction</li>
</ul>
</div>
</div>
Expand Down Expand Up @@ -75,7 +87,7 @@ <h4 class="price">₩[[${product.immediatePrice}]]</h4>
<div class="product-acution">
<div class="cv">
<span>현재 입찰가</span>
<h6>₩[[${product.currentPrice}]]</h6>
<h6 class="price">₩[[${product.currentPrice}]]</h6>
</div>
<div class="auction-timer">
<div class="countdown">
Expand Down
37 changes: 24 additions & 13 deletions src/main/resources/templates/auction/auctionDetails.html
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,17 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/sockjs-client/1.6.1/sockjs.min.js" integrity="sha512-1QvjE7BtotQjkq8PxLeF6P46gEpBRXuskzIVgjFpekzFVF4yjRgrQvTG1MTOJ3yQgvTteKAcO7DSZI92+u/yZw==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/stomp.js/2.3.3/stomp.min.js" integrity="sha512-iKDtgDyTHjAitUDdLljGhenhPwrbBfqTKWO1mkhSFH3A7blITC9MhYon6SjnMhp4o0rADGw9yAC6EW4t5a4K3g==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script>
// 금액에 쉼표 추가
function formatNumber(number) {
return number.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
}

// 경매 등록, 참여 내역 금액에 쉼표 추가
window.onload = function() {
document.querySelectorAll('.price').forEach(function(element) {
element.innerText = formatNumber(element.innerText);
});
};


document.addEventListener('DOMContentLoaded', function () {
Expand Down Expand Up @@ -476,10 +487,10 @@ <h5 th:text="'₩'+ ${#numbers.formatDecimal(productDetail.startPrice, 0, 'COMMA
<div class="auction-timer">
<div class="countdown">
<h6>
<span th:id="|days-${productDetail.id}|">0</span>D :
<span th:id="|hours-${productDetail.id}|">0</span>H :
<span th:id="|minutes-${productDetail.id}|">0</span>M :
<span th:id="|seconds-${productDetail.id}|">0</span>S
<span th:id="|days-${productDetail.id}|">0</span>
<span th:id="|hours-${productDetail.id}|">0</span>시간
<span th:id="|minutes-${productDetail.id}|">0</span>
<span th:id="|seconds-${productDetail.id}|">0</span>초 남음
</h6>
</div>
<script th:inline="javascript">
Expand Down Expand Up @@ -556,7 +567,7 @@ <h6>
</div>
<!-- 상품 이미지를 하얀 박스 위에 표시 -->
<div class="swiper-container">
<div class="swiper-wrapper">
<div class="swiper-wrapper" style="text-align: center;">
<!-- 이미지 리스트를 반복하여 표시 -->
<div class="swiper-slide" th:each="imgUrl : ${productDetail.imgUrl}">
<img alt="상품 이미지" class="product-image" th:src="${imgUrl}" onclick="openFullscreen(this)">
Expand All @@ -569,8 +580,8 @@ <h6>

<!-- 외부 좌우 내비게이션 버튼 추가 -->
<div class="external-navigation">
<button class="swiper-button-prev-outer">Prev</button>
<button class="swiper-button-next-outer">Next</button>
<button class="swiper-button-prev-outer btn btn-dark">이전</button>
<button class="swiper-button-next-outer btn btn-dark">다음</button>
</div>

<!-- Initialize Swiper -->
Expand Down Expand Up @@ -644,9 +655,9 @@ <h5 class="widget-title">상품 상세정보</h5>
</li>
<li><span>카테고리 :</span><span id="end-time"
th:text="${productDetail.category}">카테고리</span></li>
<li><span>경매 마감 시간 :</span><span th:text="${productDetail.endTime}">경매 마감 시간</span></li>
<li><span>입찰 단위 :</span><span th:text="${productDetail.bidUnit} + '₩' "></span></li>
<li><span>즉시 구매가 :</span><span th:text="${productDetail.immediatePrice}+ '₩' ">즉시 구매가</span>
<li><span>경매 마감 시간 :</span><span th:text="${#dates.format(productDetail.endTime, 'yy년 M월 d일 HH:mm:ss')}">경매 마감 시간</span></li>
<li><span>입찰 단위 :</span><span class="price" th:text="${productDetail.bidUnit} + '₩' "></span></li>
<li><span>즉시 구매가 :</span><span class="price" th:text="${productDetail.immediatePrice}+ '₩' ">즉시 구매가</span>
</li>
<li><span>상품 설명 :</span>
<span class="description" th:text="${productDetail.description}">상품 설명</span></li>
Expand Down Expand Up @@ -745,7 +756,7 @@ <h5 class="widget-title">상품 상세정보</h5>
<form class="widget-form" id="bidForm">
<div class="form-group d-flex justify-content-center align-items-center">
<!-- 현재 가격을 보여주는 입력 필드 -->
<input type="text" readonly class="form-control" placeholder="Current Price"
<input type="text" readonly class="price form-control" placeholder="Current Price"
th:value="${productDetail.currentPrice}" id="currentPrice"
name="currentPrice">
<!-- 상품 ID를 숨긴 필드에 저장 -->
Expand All @@ -759,9 +770,9 @@ <h5 class="widget-title">상품 상세정보</h5>
<form class="widget-form" id="buyForm">
<div class="form-group d-flex justify-content-center align-items-center">
<!-- 현재 가격을 보여주는 입력 필드 -->
<input type="text" readonly class="form-control" placeholder="Immediate Price"
<input type="text" readonly class="price form-control" placeholder="Immediate Price"
th:value="${productDetail.immediatePrice}" id="immediatePrice"
name="immediatePrice">
name="immediatePrice">
<!-- 상품 ID를 숨긴 필드에 저장 -->
<input type="hidden" th:value="${productDetail.id}" name="productId2"
id="productId2">
Expand Down
28 changes: 21 additions & 7 deletions src/main/resources/templates/auction/bidProduct.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,15 @@ <h5 th:text="'₩' + ${#numbers.formatDecimal(productDetail.immediatePrice, 0, '

<!-- 상품 이미지를 하얀 박스 위에 표시 -->
<div class="swiper-container">
<div class="swiper-wrapper">
<div class="swiper-wrapper" style="text-align: center;">
<!-- 이미지 리스트를 반복하여 표시 -->
<div class="swiper-slide" th:each="imgUrl : ${productDetail.imgUrl}">
<img alt="상품 이미지" class="product-image" th:src="${imgUrl}" onclick="openFullscreen(this)">
</div>
</div>
<!-- 내비게이션 버튼 -->
<div class="swiper-button-next"></div>
<div class="swiper-button-prev"></div>
<div class="swiper-button-prev-outer btn btn-dark">이전</div>
<div class="swiper-button-next-outer btn btn-dark">다음</div>
</div>

<!-- 외부 좌우 내비게이션 버튼 추가 -->
Expand Down Expand Up @@ -163,7 +163,7 @@ <h5 th:text="'₩' + ${#numbers.formatDecimal(productDetail.immediatePrice, 0, '
<div class="col-lg-6">
<div class="widget-right-area">
<div class="single-widget">
<h5 class="widget-title">Product Overview</h5>
<h5 class="widget-title">상품명</h5>
<ul class="widget-list">
<li><span>상품명 :</span><span th:text="${productDetail.name}">상품명</span></li>
<li><span>판매자 :</span>
Expand All @@ -172,9 +172,9 @@ <h5 class="widget-title">Product Overview</h5>
</a>
</li>
<li><span>카테고리 :</span><span th:text="${productDetail.category}">카테고리</span></li>
<li><span>경매 시작 시간 :</span><span th:text="${productDetail.startTime}">경매 마감 시간</span></li>
<li><span>경매 마감 시간 :</span><span th:text="${productDetail.endTime}">경매 마감 시간</span></li>
<li><span>즉시 구매가 :</span><span th:text="'₩' + ${productDetail.immediatePrice}">즉시 구매가</span></li>
<li><span>경매 시작 시간 :</span><span th:text="${#dates.format(productDetail.startTime, 'yy년 M월 d일 HH:mm:ss')}">경매 마감 시간</span></li>
<li><span>경매 마감 시간 :</span><span th:text="${#dates.format(productDetail.endTime, 'yy년 M월 d일 HH:mm:ss')}">경매 마감 시간</span></li>
<li><span>즉시 구매가 :</span><span class="price" th:text="'₩' + ${productDetail.immediatePrice}">즉시 구매가</span></li>
<li><span>상품 설명 :</span><span th:text="${productDetail.description}">상품 설명</span></li>
</ul>
</div>
Expand All @@ -185,6 +185,20 @@ <h5 class="widget-title">Product Overview</h5>
</div>
</section>

<script>
// 금액에 쉼표 추가
function formatNumber(number) {
return number.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
}

// 경매 등록, 참여 내역 금액에 쉼표 추가
window.onload = function() {
document.querySelectorAll('.price').forEach(function(element) {
element.innerText = formatNumber(element.innerText);
});
};
</script>

</div>
</body>
</html>
28 changes: 21 additions & 7 deletions src/main/resources/templates/cash/payment.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ <h5 th:text="'₩' + ${#numbers.formatDecimal(productDetail.immediatePrice, 0, '

<!-- 상품 이미지를 하얀 박스 위에 표시 -->
<div class="swiper-container">
<div class="swiper-wrapper">
<div class="swiper-wrapper" style="text-align: center;">
<!-- 이미지 리스트를 반복하여 표시 -->
<div class="swiper-slide" th:each="imgUrl : ${productDetail.imgUrl}">
<img alt="상품 이미지" class="product-image" th:src="${imgUrl}" onclick="openFullscreen(this)">
Expand All @@ -105,8 +105,8 @@ <h5 th:text="'₩' + ${#numbers.formatDecimal(productDetail.immediatePrice, 0, '

<!-- 외부 좌우 내비게이션 버튼 추가 -->
<div class="external-navigation">
<button class="swiper-button-prev-outer">Prev</button>
<button class="swiper-button-next-outer">Next</button>
<button class="swiper-button-prev-outer btn btn-dark">이전</button>
<button class="swiper-button-next-outer btn btn-dark">다음</button>
</div>

<!-- Initialize Swiper -->
Expand Down Expand Up @@ -163,7 +163,7 @@ <h5 th:text="'₩' + ${#numbers.formatDecimal(productDetail.immediatePrice, 0, '
<div class="col-lg-6">
<div class="widget-right-area">
<div class="single-widget">
<h5 class="widget-title">Product Overview</h5>
<h5 class="widget-title">상품 결제</h5>
<ul class="widget-list">
<li><span>상품명 :</span><span th:text="${productDetail.name}">상품명</span></li>
<li><span>판매자 :</span>
Expand All @@ -172,9 +172,9 @@ <h5 class="widget-title">Product Overview</h5>
</a>
</li>
<li><span>카테고리 :</span><span th:text="${productDetail.category}">카테고리</span></li>
<li><span>경매 시작 시간 :</span><span th:text="${productDetail.startTime}">경매 시작 시간</span></li>
<li><span>경매 마감 시간 :</span><span th:text="${productDetail.endTime}">경매 마감 시간</span></li>
<li><span>즉시 구매가 :</span><span th:text="'₩' + ${productDetail.currentPrice}">즉시 구매가</span></li>
<li><span>경매 시작 시간 :</span><span th:text="${#dates.format(productDetail.startTime, 'yy년 M월 d일 HH:mm:ss')}">경매 시작 시간</span></li>
<li><span>경매 마감 시간 :</span><span th:text="${#dates.format(productDetail.endTime, 'yy년 M월 d일 HH:mm:ss')}">경매 마감 시간</span></li>
<li><span>즉시 구매가 :</span><span class="price" th:text="'₩' + ${productDetail.currentPrice}">즉시 구매가</span></li>
<li><span>상품 설명 :</span><span th:text="${productDetail.description}">상품 설명</span></li>
</ul>
</div>
Expand Down Expand Up @@ -282,6 +282,20 @@ <h5 class="widget-title">Product Overview</h5>
</div>
</section>

<script>
// 금액에 쉼표 추가
function formatNumber(number) {
return number.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
}

// 경매 등록, 참여 내역 금액에 쉼표 추가
window.onload = function() {
document.querySelectorAll('.price').forEach(function(element) {
element.innerText = formatNumber(element.innerText);
});
};
</script>

</div>
</body>
</html>
Loading

0 comments on commit e8ca554

Please sign in to comment.