Просмотр исходного кода

상품상세 정보의 상품 이미지 ONERROR 처리

eskim 5 лет назад
Родитель
Сommit
63c5eb1ebc

+ 11 - 10
src/main/webapp/WEB-INF/views/web/goods/GoodsDealDescFormWeb.html

@@ -47,6 +47,7 @@
 			<iframe th:src="${'https://www.youtube.com/embed/'+goodsVideo.kmcKey+'?rel=0'}" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
 			</th:block>
 			<th:block th:unless="${goodsVideo.videoGb == 'Y'}">
+			<iframe width="100%" height="100%" th:src="${kollusMediaUrl+'/'+goodsVideo.kmcKey +'?player_version=html5'}" frameborder="0" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe>
 			</th:block>
 		</div>
 		</th:block>
@@ -85,7 +86,7 @@
 																		or #strings.contains(goodsImg.sysImgNm,'_M3')
 																		or #strings.contains(goodsImg.sysImgNm,'_M4')
 																		or #strings.contains(goodsImg.sysImgNm,'_M5')}">
-			<img th:src="${imgGoodsUrl+'/'+goodsImg.sysImgNm+'?RS=720'}" alt="">
+			<img th:src="${imgGoodsUrl+'/'+goodsImg.sysImgNm+'?RS=720'}" alt="" th:onerror="'this.src=\''+@{${uxImgUrl}+ '/images/pc/thumb/bg_item_none.png'}+'\';'">
 			</th:block>
 		</div>
 	</div>
@@ -108,7 +109,7 @@
 																		or #strings.contains(goodsImg.sysImgNm,'_D3')
 																		or #strings.contains(goodsImg.sysImgNm,'_D4')
 																		or #strings.contains(goodsImg.sysImgNm,'_D5')}">
-			<img th:src="${imgGoodsUrl+'/'+goodsImg.sysImgNm+'?RS=720'}" alt="">
+			<img th:src="${imgGoodsUrl+'/'+goodsImg.sysImgNm+'?RS=720'}" alt="" th:onerror="'this.src=\''+@{${uxImgUrl}+ '/images/pc/thumb/bg_item_none.png'}+'\';'">
 			</th:block>
 		</div>
 	</div>
@@ -118,7 +119,7 @@
 		<span class="tit_view">FABRIC</span>
 		<div class="view">
 			<th:block th:each="goodsImg, status : ${goodsImgList}" th:if="${#strings.contains(goodsImg.sysImgNm,'_S1')}">
-			<img th:src="${imgGoodsUrl+'/'+goodsImg.sysImgNm+'?RS=720}" alt="">
+			<img th:src="${imgGoodsUrl+'/'+goodsImg.sysImgNm+'?RS=720}" alt="" th:onerror="'this.src=\''+@{${uxImgUrl}+ '/images/pc/thumb/bg_item_none.png'}+'\';'">
 			</th:block>
 		</div>
 	</div>
@@ -131,7 +132,7 @@
 			<span>
 				<th:block th:each="goodsImg, status : ${goodsImgList}" th:if="${#strings.contains(goodsImg.sysImgNm,'_L1') 
 																		or #strings.contains(goodsImg.sysImgNm,'_L2')}">
-				<img th:src="${imgGoodsUrl+'/'+goodsImg.sysImgNm+'?RS=250}" alt="">
+				<img th:src="${imgGoodsUrl+'/'+goodsImg.sysImgNm+'?RS=250}" alt="" th:onerror="'this.src=\''+@{${uxImgUrl}+ '/images/pc/thumb/bg_item_none.png'}+'\';'">
 				</th:block>
 			</span>
 		</div>
@@ -240,10 +241,10 @@
 		</div>
 	</div>
 	<!-- //상품필수정보 노출 -->
-	</div>
-	<div class="btn_more_box covered">
-		<button type="button" class="btn btn_default btn_md">
-			<span>상세정보 더보기</span>
-		</button>
-	</div>
+</div>
+<div class="btn_more_box covered">
+	<button type="button" class="btn btn_default btn_md">
+		<span>상세정보 더보기</span>
+	</button>
+</div>
 </html>

+ 5 - 5
src/main/webapp/WEB-INF/views/web/goods/GoodsDetailFormWeb.html

@@ -46,7 +46,6 @@
 												</th:block>
 												<th:block th:unless="${goodsVideo.videoGb == 'Y'}">
 												<iframe width="100%" height="100%" th:src="${kollusMediaUrl+'/'+goodsVideo.kmcKey +'?player_version=html5'}" frameborder="0" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe>
-												
 												</th:block>
 												</span>
 											</a>
@@ -478,6 +477,7 @@
 						<iframe th:src="${'https://www.youtube.com/embed/'+goodsVideo.kmcKey+'?rel=0'}" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
 						</th:block>
 						<th:block th:unless="${goodsVideo.videoGb == 'Y'}">
+						<iframe width="100%" height="100%" th:src="${kollusMediaUrl+'/'+goodsVideo.kmcKey +'?player_version=html5'}" frameborder="0" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe>
 						</th:block>
 					</div>
 					</th:block>
@@ -519,7 +519,7 @@
 																					or #strings.contains(goodsImg.sysImgNm,'_M3')
 																					or #strings.contains(goodsImg.sysImgNm,'_M4')
 																					or #strings.contains(goodsImg.sysImgNm,'_M5')}">
-						<img th:src="${imgGoodsUrl+'/'+goodsImg.sysImgNm+'?RS=720'}" alt="">
+						<img th:src="${imgGoodsUrl+'/'+goodsImg.sysImgNm+'?RS=720'}" alt="" th:onerror="'this.src=\''+@{${uxImgUrl}+ '/images/pc/thumb/bg_item_none.png'}+'\';'">
 						</th:block>
 					</div>
 				</div>
@@ -542,7 +542,7 @@
 																					or #strings.contains(goodsImg.sysImgNm,'_D3.')
 																					or #strings.contains(goodsImg.sysImgNm,'_D4.')
 																					or #strings.contains(goodsImg.sysImgNm,'_D5.')}">
-						<img th:src="${imgGoodsUrl+'/'+goodsImg.sysImgNm+'?RS=720'}" alt="">
+						<img th:src="${imgGoodsUrl+'/'+goodsImg.sysImgNm+'?RS=720'}" alt="" th:onerror="'this.src=\''+@{${uxImgUrl}+ '/images/pc/thumb/bg_item_none.png'}+'\';'">
 						</th:block>
 					</div>
 				</div>
@@ -552,7 +552,7 @@
 					<span class="tit_view">FABRIC</span>
 					<div class="view">
 						<th:block th:each="goodsImg, status : ${goodsImgList}" th:if="${#strings.contains(goodsImg.sysImgNm,'_S1')}">
-						<img th:src="${imgGoodsUrl+'/'+goodsImg.sysImgNm+'?RS=720'}" alt="">
+						<img th:src="${imgGoodsUrl+'/'+goodsImg.sysImgNm+'?RS=720'}" alt="" th:onerror="'this.src=\''+@{${uxImgUrl}+ '/images/pc/thumb/bg_item_none.png'}+'\';'">
 						</th:block>
 					</div>
 				</div>
@@ -565,7 +565,7 @@
 						<span>
 							<th:block th:each="goodsImg, status : ${goodsImgList}" th:if="${#strings.contains(goodsImg.sysImgNm,'_L1') 
 																					or #strings.contains(goodsImg.sysImgNm,'_L2')}">
-							<img th:src="${imgGoodsUrl+'/'+goodsImg.sysImgNm+'?RS=250'}" alt="">
+							<img th:src="${imgGoodsUrl+'/'+goodsImg.sysImgNm+'?RS=250'}" alt=""  th:onerror="'this.src=\''+@{${uxImgUrl}+ '/images/pc/thumb/bg_item_none.png'}+'\';'">
 							</th:block>
 						</span>
 					</div>