Skip to content

Commit

Permalink
微調食譜首頁的圖片及小調整(圖片)
Browse files Browse the repository at this point in the history
  • Loading branch information
hevinhsu committed Nov 12, 2019
1 parent faecf4c commit c3b053a
Show file tree
Hide file tree
Showing 9 changed files with 44 additions and 27 deletions.
2 changes: 1 addition & 1 deletion src/main/java/shopping/controller/Mall.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
import shopping.service.PlaneProductService;
import shopping.service.ProductService;

@Controller
//@Controller
public class Mall {
private final Integer mealboxCount = 1;
private Integer totalAmount;
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/hibernate.cfg.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<!-- 2. 其他與資料存取有關的設定 -->
<!-- 自動產生資料庫的Schema -->
<property name="hbm2ddl.import_files">update.sql</property>
<property name="hbm2ddl.auto">create</property>
<property name="hbm2ddl.auto">update</property>
<!-- 顯示實際操作資料庫時的SQL -->
<property name="show_sql">false</property>
<!-- 將顯示的SQL排版,方便觀看 -->
Expand Down
Binary file added src/main/webapp/WEB-INF/views/img/nav/qqqqq.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 20 additions & 3 deletions src/main/webapp/WEB-INF/views/js/loadMyRecipe.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,28 @@ $(document).ready(function start() {
success: function (data) {
// let list = JSON.parse(data);
let list = data;
console.log('data=' + list);
console.log("aboutmember=" + list[1]);
if (list[0].pkey === ownerId) {
// console.log('data=' + list);
console.log("aboutmember=" + list[0].pkey);

if(list[0].memberImage!= undefined){
console.log('testtesttest');
let str = (list[0].memberImage).split('.');
document.getElementById('headPhoto').src = `/ezfit/image/memberHead/${list[0].memberImage}/${str[str.length-1]}`;
}else{
console.log('nononononono');
document.getElementById('headPhoto').src = 'http://localhost:8080/ezfit/index/img/nav/logo-g.svg';
document.getElementById('headPhoto').style.width = '120px';
}



if (list[0].pkey == ownerId) {
document.getElementById('whosRecipe').innerHTML = "我的食譜";
// document.getElementById('memberIntro').innerHTML = list[0].introduction;
document.getElementById('memberName').innerHTML = list[0].name;



}
else if (list[0].name != undefined && list[0].pkey !== ownerId) {
document.getElementById('whosRecipe').innerHTML = String(list[0].name) + "的食譜";
Expand Down Expand Up @@ -72,6 +86,9 @@ $(document).ready(function start() {
console.log('profileImg = '+list[0].coverImg);
let str = (list[0].coverImg).split('.');
document.getElementById('profileCover').src = `/ezfit/image/member/${list[0].coverImg}/${str[str.length-1]}`;
}else{
document.getElementById('profileCover').src ='https://loremflickr.com/1200/400/dessert';
// /ezfit/index/img/nav/logo-g.svg
}


Expand Down
4 changes: 2 additions & 2 deletions src/main/webapp/WEB-INF/views/my_page.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@
<div class="row user-header p-0 m-0">
<div class="col-12 cover-avatar-row p-0 m-0">
<div class="profile-cover">
<img id="profileCover" src="https://picsum.photos/1200/400" alt="">
<img id="profileCover" src="https://loremflickr.com/1200/400/dessert" alt="">
</div>
<div class="avatar">
<img src="http://placekitten.com/200/200" alt="">
<img src="http://placekitten.com/200/200" id='headPhoto' >
</div>
<div class="name-description-row">
<div class="name-settings-row">
Expand Down
36 changes: 18 additions & 18 deletions src/main/webapp/WEB-INF/views/recipe_main.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,15 @@
</ol>
<div class="carousel-inner">
<div class="carousel-item active">
<a href="#"><img src="https://picsum.photos/854/422"
<a href="#"><img src="https://loremflickr.com/1200/400/dessert"
class="d-block w-100 editor-choice-img" alt="...">

<div class="carousel-caption">
<div class="mb-1">
<span class="badge badge-pill badge-success">編輯精選</span>
</div>
<h5>立了參生市卻</h5>
<p>天記勢次運</p>
<h5></h5>
<p></p>
</div> </a>

</div>
Expand Down Expand Up @@ -281,7 +281,7 @@

<div class="col-3 m-0 p-2 new-recipe-item">
<div class="new-recipes-img">
<a href=""><img src="http://placeimg.com/190/136/any"
<a href=""><img src="https://loremflickr.com/194/140/dessert"
alt="..."></a>
</div>
<div class="new-recipe-item-text">
Expand All @@ -296,7 +296,7 @@

<div class="col-3 m-0 p-2 new-recipe-item">
<div class="new-recipes-img">
<a href=""><img src="https://picsum.photos/191/137"
<a href=""><img src="https://loremflickr.com/194/140/dessert"
alt="..."></a>
</div>
<div class="new-recipe-item-text">
Expand All @@ -311,7 +311,7 @@

<div class="col-3 m-0 p-2 new-recipe-item">
<div class="new-recipes-img ">
<a href=""><img src="https://picsum.photos/192/138"
<a href=""><img src="https://loremflickr.com/194/140/dessert"
alt="..."></a>
</div>
<div class="new-recipe-item-text">
Expand All @@ -326,7 +326,7 @@

<div class="col-3 m-0 p-2 new-recipe-item">
<div class="new-recipes-img">
<a href=""><img src="http://placekitten.com/193/139"
<a href=""><img src="https://loremflickr.com/194/140/dessert"
alt="..."></a>
</div>
<div class="new-recipe-item-text">
Expand All @@ -341,7 +341,7 @@

<div class="col-3 m-0 p-2 new-recipe-item">
<div class="new-recipes-img">
<a href=""><img src="https://loremflickr.com/194/140"
<a href=""><img src="https://loremflickr.com/194/140/dessert"
alt="..."></a>
</div>
<div class="new-recipe-item-text">
Expand Down Expand Up @@ -371,7 +371,7 @@

<div class="col-3 m-0 p-2 new-recipe-item">
<div class="new-recipes-img ">
<a href=""><img src="https://picsum.photos/196/142"
<a href=""><img src="https://loremflickr.com/195/141/dessert"
alt="..."></a>
</div>
<div class="new-recipe-item-text">
Expand All @@ -386,7 +386,7 @@

<div class="col-3 m-0 p-2 new-recipe-item">
<div class="new-recipes-img">
<a href=""><img src="https://loremflickr.com/197/143"
<a href=""><img src="https://loremflickr.com/197/143/dessert"
alt="..."></a>
</div>
<div class="new-recipe-item-text">
Expand Down Expand Up @@ -414,7 +414,7 @@

<div class="col-3 m-0 p-2 new-recipe-item">
<div class="new-recipes-img">
<a href=""><img src="http://placeimg.com/205/151/any"
<a href=""><img src="https://loremflickr.com/205/151/dessert"
alt="..."></a>
</div>
<div class="new-recipe-item-text">
Expand All @@ -429,7 +429,7 @@

<div class="col-3 m-0 p-2 new-recipe-item">
<div class="new-recipes-img">
<a href=""><img src="https://picsum.photos/204/150"
<a href=""><img src="https://loremflickr.com/204/150/dessert"
alt="..."></a>
</div>
<div class="new-recipe-item-text">
Expand All @@ -444,7 +444,7 @@

<div class="col-3 m-0 p-2 new-recipe-item">
<div class="new-recipes-img ">
<a href=""><img src="https://picsum.photos/203/149"
<a href=""><img src="https://loremflickr.com/203/149/dessert"
alt="..."></a>
</div>
<div class="new-recipe-item-text">
Expand All @@ -459,7 +459,7 @@

<div class="col-3 m-0 p-2 new-recipe-item">
<div class="new-recipes-img">
<a href=""><img src="http://placekitten.com/202/148"
<a href=""><img src="https://loremflickr.com/202/148/dessert"
alt="..."></a>
</div>
<div class="new-recipe-item-text">
Expand All @@ -474,7 +474,7 @@

<div class="col-3 m-0 p-2 new-recipe-item">
<div class="new-recipes-img">
<a href=""><img src="https://loremflickr.com/201/147"
<a href=""><img src="https://loremflickr.com/201/147/dessert"
alt="..."></a>
</div>
<div class="new-recipe-item-text">
Expand All @@ -489,7 +489,7 @@

<div class="col-3 m-0 p-2 new-recipe-item">
<div class="new-recipes-img">
<a href=""><img src="https://picsum.photos/200/146"
<a href=""><img src="https://loremflickr.com/200/146/dessert"
alt="..."></a>
</div>
<div class="new-recipe-item-text">
Expand All @@ -504,7 +504,7 @@

<div class="col-3 m-0 p-2 new-recipe-item">
<div class="new-recipes-img ">
<a href=""><img src="https://picsum.photos/199/145"
<a href=""><img src="https://loremflickr.com/199/145/dessert"
alt="..."></a>
</div>
<div class="new-recipe-item-text">
Expand All @@ -519,7 +519,7 @@

<div class="col-3 m-0 p-2 new-recipe-item">
<div class="new-recipes-img">
<a href=""><img src="https://loremflickr.com/198/144"
<a href=""><img src="https://loremflickr.com/198/144/dessert"
alt="..."></a>
</div>
<div class="new-recipe-item-text">
Expand Down
2 changes: 1 addition & 1 deletion target/classes/hibernate.cfg.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<!-- 2. 其他與資料存取有關的設定 -->
<!-- 自動產生資料庫的Schema -->
<property name="hbm2ddl.import_files">update.sql</property>
<property name="hbm2ddl.auto">create</property>
<property name="hbm2ddl.auto">update</property>
<!-- 顯示實際操作資料庫時的SQL -->
<property name="show_sql">false</property>
<!-- 將顯示的SQL排版,方便觀看 -->
Expand Down
Binary file modified target/classes/shopping/controller/Mall.class
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#Generated by Maven Integration for Eclipse
#Tue Nov 12 15:01:12 CST 2019
#Tue Nov 12 15:58:47 CST 2019
m2e.projectLocation=C\:\\_JSP\\workspaceJDBC\\ezfit
m2e.projectName=ezfit
groupId=ntut.edu.com.java012
Expand Down

0 comments on commit c3b053a

Please sign in to comment.