ソースを参照

상품상세 이미지 경로 변환 /Upload/Local - > /Local

eskim 4 年 前
コミット
bbc42f0441

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

@@ -354,7 +354,9 @@
    $(document).ready( function() {
 	   $(".pd_descrp .cont_body").find('img').each(function() {
 			let tmpImgSrc = $(this).attr('src');
-			if (tmpImgSrc.indexOf('Upload') == 1 ){  // /Upload
+			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"));
 			}
 			

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

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

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

@@ -311,7 +311,9 @@
    $(document).ready( function() {
    	 $(".pd_descrp_pop .cont_body").find('img').each(function() {
 			let tmpImgSrc = $(this).attr('src');
-			if (tmpImgSrc.indexOf('Upload') == 1 ){  // /Upload
+			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"));
 			}
 			

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

@@ -2723,14 +2723,16 @@
      window.onload = function(){
     	 $(".pd_descrp .cont_body").find('img').each(function() {
  			let tmpImgSrc = $(this).attr('src');
- 			if (tmpImgSrc.indexOf('/Upload') == 0 ){  // /Upload
+ 			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"));
  			}
  			
  		});
  	}
      
-
+   
 	// 광고 스크립트용
 	var goodsNavigation = [[${goodsNavigation}]];
 	var cate1Nm = "";