Commit 89f5e5f6 authored by shoei.kanno's avatar shoei.kanno

商品一覧画面画像表示

parent c423ab94
...@@ -81,12 +81,12 @@ public class EcsiteController { ...@@ -81,12 +81,12 @@ public class EcsiteController {
//靴の情報を一括で取得するmodel(Idでの降順表示設定済み) //靴の情報を一括で取得するmodel(Idでの降順表示設定済み)
model.addAttribute("shoes", shoes); model.addAttribute("shoes", shoes);
//靴を表示するための処理を全画像にかける //靴を表示するための処理を全画像にかける
List <String> shoesPhoto = new ArrayList<String> (); // List <String> shoesPhoto = new ArrayList<String> ();
for(int i = 0; i < shoes.size(); i++) { // for(int i = 0; i < shoes.size(); i++) {
shoesPhoto.add((shoes.get(i)).getPhoto()); // shoesPhoto.add((shoes.get(i)).getPhoto());
} // }
//靴の処理した画像を一括で取得する //靴の処理した画像を一括で取得する
model.addAttribute("shoesPhoto", shoesPhoto); // model.addAttribute("shoesPhoto", shoesPhoto);
//user情報取得、格納 //user情報取得、格納
User user = userDetails.getUser(); User user = userDetails.getUser();
......
...@@ -94,8 +94,7 @@ ...@@ -94,8 +94,7 @@
<div id="listBox"> <div id="listBox">
<!--each分でくりかえす(宮嶋)--> <!--each分でくりかえす(宮嶋)-->
<div class="productBox" th:each="shoe : ${shoes}"> <div class="productBox" th:each="shoe : ${shoes}">
<div th:each="shoesPhoto : ${shoesPhoto}"> <img class="shoeImage" th:src="@{/upload/{photo}(photo=${shoe.photo})}" alt="productImage" width="300" height="300"/>
<img class="shoeImage" th:src="@{upload/スニーカー1.jpg}" alt="productImage"/>
<p th:text= "${shoe.name}" class="shoeName">AirMAX</p> <p th:text= "${shoe.name}" class="shoeName">AirMAX</p>
<p th:text = "'&yen;' +${shoe.price}" class="shoePrice">¥10,000</p> <p th:text = "'&yen;' +${shoe.price}" class="shoePrice">¥10,000</p>
<input type="hidden" th:value="${shoe.id}"/> <input type="hidden" th:value="${shoe.id}"/>
...@@ -103,7 +102,6 @@ ...@@ -103,7 +102,6 @@
<!-- <button class="js-modal-open" id="sign-up">Details</button>--> <!-- <button class="js-modal-open" id="sign-up">Details</button>-->
</div> </div>
</div> </div>
</div>
<footer class="footer"> <footer class="footer">
<div class="container"> <div class="container">
<div class="row"> <div class="row">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment