Procházet zdrojové kódy

页面图片显示在有项目名称的情况下不正确

qxp192083 před 4 roky
rodič
revize
5b448a8fc0

+ 7 - 1
suishenbang-wxportal/suishenbang-wxportal-manager/src/main/resources/templates/wxportal/banner/banner.html

@@ -83,7 +83,13 @@
                     field : 'imgUrl',
                     title : 'banner图    ',
                     formatter: function(value, row, index) {
-                        return $.table.imageView(value,200,600,"tableImage_l img-view");
+                        var str="";
+                        if(ctx=="/"){
+                            str = value;
+                        }else{
+                            str = ctx+value;
+                        }
+                        return $.table.imageView(str,200,600,"tableImage_l img-view");
 
                     }
                 },

+ 1 - 1
suishenbang-wxportal/suishenbang-wxportal-manager/src/main/resources/templates/wxportal/banner/edit.html

@@ -35,7 +35,7 @@
                 <div class="col-sm-8">
                     <input id="input_imgUrl" name="imgUrl" th:field="*{imgUrl}" type="hidden"/>
                     <div class="thumbnail slideshow_span bg-lg" id="div-bgUrl" onclick="javascript:imgUpload()">
-                        <img th:src="*{imgUrl}" style="width:100%;height:100%;">
+                        <img th:src="@{*{imgUrl}}" style="width:100%;height:100%;">
                     </div>
                 </div>
             </div>

+ 1 - 1
suishenbang-wxportal/suishenbang-wxportal-manager/src/main/resources/templates/wxportal/magnet/edit.html

@@ -63,7 +63,7 @@
                 <div class="col-sm-8">
                     <input id="input_bgUrl" name="bgUrl" th:field="*{bgUrl}" type="hidden"/>
                     <div class="thumbnail slideshow_span" id="div-bgUrl" onclick="javascript:bgUpload()">
-                        <img th:src="*{bgUrl}" style="width;100%;height:100%;">
+                        <img th:src="@{*{bgUrl}}" style="width;100%;height:100%;">
                     </div>
                 </div>
             </div>

+ 9 - 3
suishenbang-wxportal/suishenbang-wxportal-manager/src/main/resources/templates/wxportal/magnet/wxMagnet.html

@@ -94,12 +94,18 @@
 		            title: '背景图片',
 		            width: '10%',
                     formatter: function(value, row, index) {
+                        var str="";
+                        if(ctx=="/"){
+                            str = value;
+                        }else{
+                            str = ctx+value;
+                        }
                         if(row.magnetSize=="S"){
-                            return $.table.imageView(value,200,200,"tableImage_s img-view");
+                            return $.table.imageView(str,200,200,"tableImage_s img-view");
                         }else if(row.magnetSize=="M"){
-                            return $.table.imageView(value,200,300,"tableImage_m img-view");
+                            return $.table.imageView(str,200,300,"tableImage_m img-view");
                         }else if(row.magnetSize=="L"){
-                            return $.table.imageView(value,200,600,"tableImage_l img-view");
+                            return $.table.imageView(str,200,600,"tableImage_l img-view");
                         }
                     }
 		        },