From 5d1d037bb1f5586def63376470a805fc824a625d Mon Sep 17 00:00:00 2001 From: bongsh0112 Date: Tue, 26 Sep 2023 00:31:57 +0900 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20picture=20detail=20=ED=8E=98?= =?UTF-8?q?=EC=9D=B4=EC=A7=80=20=EB=AA=A8=EB=8B=AC=20=EA=B5=AC=ED=98=84=20?= =?UTF-8?q?#63?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Api/src/main/resources/static/css/detail.css | 26 +++++------ Api/src/main/resources/static/js/bidModal.js | 9 ++++ .../main/resources/static/js/detailModal.js | 43 +++++++++++++++++++ .../main/resources/static/js/onlyresize.js | 2 + .../templates/pictures/pictureDetail.html | 37 +++++++++++++--- 5 files changed, 98 insertions(+), 19 deletions(-) create mode 100644 Api/src/main/resources/static/js/bidModal.js create mode 100644 Api/src/main/resources/static/js/detailModal.js diff --git a/Api/src/main/resources/static/css/detail.css b/Api/src/main/resources/static/css/detail.css index 2ed18ba7..b4317cdb 100644 --- a/Api/src/main/resources/static/css/detail.css +++ b/Api/src/main/resources/static/css/detail.css @@ -71,19 +71,19 @@ font-size: 31px; } -.details-box .btn { - position: absolute; - bottom: 40px; - right: 900px; - width: 110px; - height: 50px; - font-size: 30px; - color: #99F54D; - box-shadow: 0px 0px 10px rgba(219, 134, 129, 86); - - background-color: #761766; - z-index: 2; -} +/*.details-box .btn {*/ +/* position: absolute;*/ +/* bottom: 40px;*/ +/* right: 900px;*/ +/* width: 110px;*/ +/* height: 50px;*/ +/* font-size: 30px;*/ +/* color: #99F54D;*/ +/* box-shadow: 0px 0px 10px rgba(219, 134, 129, 86);*/ + +/* background-color: #761766;*/ +/* z-index: 2;*/ +/*}*/ /* Optional: Adjust margin between the box and other elements */ .details-box + * { diff --git a/Api/src/main/resources/static/js/bidModal.js b/Api/src/main/resources/static/js/bidModal.js new file mode 100644 index 00000000..1345b336 --- /dev/null +++ b/Api/src/main/resources/static/js/bidModal.js @@ -0,0 +1,9 @@ +const inputP = document.getElementById('inputPrice') +const priceAmount = document.getElementById('price_amount') + +//결제 가격 +function inputPrice(e){ + const bidNum = (e.value); + inputP.value = e.value; + priceAmount.textContent = "입찰 금액 : " + bidNum + "원"; +} diff --git a/Api/src/main/resources/static/js/detailModal.js b/Api/src/main/resources/static/js/detailModal.js new file mode 100644 index 00000000..48f70ed1 --- /dev/null +++ b/Api/src/main/resources/static/js/detailModal.js @@ -0,0 +1,43 @@ +var amount = document.getElementById('inputPrice'); + +var userId; +var bidResult = obj => { + $.ajax({ + type : 'post', + url : '/user/session-info', + success : function(data, status, xhr) { + userId = data.userId + }, + error : function(xhr, status, error) { + alert('입찰 불가') + }, + }) + + var price = document.getElementById("inputPrice").value; + $.ajax({ + type: 'post', + url: 'urlurlurl', + dataType: 'json', + contentType: 'application/json; charset=utf-8', + data: JSON.stringify({ + "bidPrice" : price + }) + }) +} + +// function postPayInfo(tof, response) { +// $.ajax({ +// type : 'post', +// url : '넣고싶은 url 넣으시길', +// dataType: 'json', +// contentType: 'application/json; charset=utf-8', +// data : JSON.stringify({ +// "payResult" : tof, +// "userId" : userId, +// "merchantUid" : response.merchant_uid, +// "productName" : response.name, +// "pgProvider" : response.pg_provider, +// "paidAmount" : response.paid_amount +// }) +// }) +// } \ No newline at end of file diff --git a/Api/src/main/resources/static/js/onlyresize.js b/Api/src/main/resources/static/js/onlyresize.js index 492eb736..2471ea62 100644 --- a/Api/src/main/resources/static/js/onlyresize.js +++ b/Api/src/main/resources/static/js/onlyresize.js @@ -39,6 +39,8 @@ }); } +// TODO: 그림의 사이즈는 912 * 600으로 리사이징한다 + // 리사이즈된 이미지를 표시하는 함수 async function displayResizedImage() { const originalImageUrl = '../static/asset/한소희.jpeg'; diff --git a/Api/src/main/resources/templates/pictures/pictureDetail.html b/Api/src/main/resources/templates/pictures/pictureDetail.html index 20f53406..961f8854 100644 --- a/Api/src/main/resources/templates/pictures/pictureDetail.html +++ b/Api/src/main/resources/templates/pictures/pictureDetail.html @@ -8,14 +8,13 @@ >
- - - + +
- Picture + + @@ -36,7 +35,27 @@

- + + +
@@ -47,5 +66,11 @@


+ + + + From 0a3fe4d2ba9e5fa7a0c5b5761573744e6b1254df Mon Sep 17 00:00:00 2001 From: bongsh0112 Date: Tue, 26 Sep 2023 12:22:14 +0900 Subject: [PATCH 2/2] =?UTF-8?q?feat:=20header=20=EC=9C=A0=EC=A0=80=20?= =?UTF-8?q?=ED=94=84=EB=A1=9C=ED=95=84=20=EC=82=AC=EC=A7=84=20=EB=A6=AC?= =?UTF-8?q?=EC=82=AC=EC=9D=B4=EC=A7=95=20by=20image=20optimizer=20#63?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Api/src/main/resources/templates/fragment/header.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Api/src/main/resources/templates/fragment/header.html b/Api/src/main/resources/templates/fragment/header.html index 951fa75b..c4644ce4 100644 --- a/Api/src/main/resources/templates/fragment/header.html +++ b/Api/src/main/resources/templates/fragment/header.html @@ -50,7 +50,9 @@ User Profile + User Profile