Selaa lähdekoodia

모바일 상품상세 이미지변경 $(document).ready 로 변경

eskim 4 vuotta sitten
vanhempi
commit
debf10f65f
1 muutettua tiedostoa jossa 13 lisäystä ja 15 poistoa
  1. 13 15
      src/main/webapp/WEB-INF/views/mob/goods/GoodsDetailFormMob.html

+ 13 - 15
src/main/webapp/WEB-INF/views/mob/goods/GoodsDetailFormMob.html

@@ -2886,6 +2886,18 @@
 			$('.modal.photo_comment_popup .pop_detail').toggleClass('active');
 		});
 		
+		 // 상품상세 asis html  이지미 경로 수정
+		$(".pd_descrp .cont_body").find('img').each(function() {
+			let tmpImgSrc = $(this).attr('src');
+			if (tmpImgSrc.indexOf('Upload') == 1 ){  // /Upload
+				$(this).attr('src' , tmpImgSrc.replace('/Upload', _imgUrl+"/Local"));
+			}
+			
+			if (tmpImgSrc.indexOf('/Upload/Local') > 0 ){  // /Upload
+ 				$(this).attr('src' , tmpImgSrc.replace('/Upload/Local', "/Local"));
+ 			} 
+			
+		});
 	});
 	
 
@@ -2927,21 +2939,7 @@
 	let vh = window.innerHeight * 0.01;
 	document.documentElement.style.setProperty('--vh', `${vh}px`);
 	
-	 // 상품상세 asis html  이지미 경로 수정
-	window.onload = function(){
-   	 $(".pd_descrp .cont_body").find('img').each(function() {
-			let tmpImgSrc = $(this).attr('src');
-			if (tmpImgSrc.indexOf('Upload') == 1 ){  // /Upload
-				$(this).attr('src' , tmpImgSrc.replace('/Upload', _imgUrl+"/Local"));
-			}
-			
-			if (tmpImgSrc.indexOf('/Upload/Local') > 0 ){  // /Upload
- 				$(this).attr('src' , tmpImgSrc.replace('/Upload/Local', "/Local"));
- 			} 
-			
-		});
-		
-	};
+	
 	
    	let goodsVideoList = [[${goodsVideoList}]];
 	let videoFlag = false;