Bladeren bron

asis html 이미지 경로 변환처리 수정

eskim 4 jaren geleden
bovenliggende
commit
c655f3ecd5

+ 5 - 3
src/main/webapp/WEB-INF/views/mob/goods/GoodsDealDescFormMob.html

@@ -354,12 +354,14 @@
    $(document).ready( function() {
 	   $(".pd_descrp .cont_body").find('img').each(function() {
 			let tmpImgSrc = $(this).attr('src');
-			if (tmpImgSrc.indexOf('/Upload/Local') > 0 ){  // /Upload
- 				$(this).attr('src' , tmpImgSrc.replace('/Upload/Local', "/Local"));
- 			}else if (tmpImgSrc.indexOf('Upload') == 1 ){  // /Upload
+			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"));
+ 			} 
+			
 		});
 	   
 	 	//210526_ 추가 : 이미지 style 속성 제거

+ 5 - 3
src/main/webapp/WEB-INF/views/mob/goods/GoodsDetailFormMob.html

@@ -2931,12 +2931,14 @@
 	window.onload = function(){
    	 $(".pd_descrp .cont_body").find('img').each(function() {
 			let tmpImgSrc = $(this).attr('src');
-			if (tmpImgSrc.indexOf('/Upload/Local') > 0 ){  // /Upload
- 				$(this).attr('src' , tmpImgSrc.replace('/Upload/Local', "/Local"));
- 			}else if (tmpImgSrc.indexOf('Upload') == 1 ){  // /Upload
+			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"));
+ 			} 
+			
 		});
 		
 	};

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

@@ -311,12 +311,14 @@
    $(document).ready( function() {
    	 $(".pd_descrp_pop .cont_body").find('img').each(function() {
 			let tmpImgSrc = $(this).attr('src');
-			if (tmpImgSrc.indexOf('/Upload/Local') > 0 ){  // /Upload
- 				$(this).attr('src' , tmpImgSrc.replace('/Upload/Local', "/Local"));
- 			}else if (tmpImgSrc.indexOf('Upload') == 1 ){  // /Upload
+			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"));
+ 			} 
+			
 		});
    //210526_ 추가 : 이미지 style 속성 제거
 	$(".mdhtml_box style").remove();$(".mdhtml_box img").removeAttr("style");

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

@@ -2723,11 +2723,13 @@
      window.onload = function(){
     	 $(".pd_descrp .cont_body").find('img').each(function() {
  			let tmpImgSrc = $(this).attr('src');
- 			if (tmpImgSrc.indexOf('/Upload/Local') > 0 ){  // /Upload
+ 			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"));
- 			}else if (tmpImgSrc.indexOf('Upload') == 1 ){  // /Upload
- 				$(this).attr('src' , tmpImgSrc.replace('/Upload', _imgUrl+"/Local"));
- 			}
+ 			} 
  			
  		});
  	}