Procházet zdrojové kódy

wip:图片增加域名

wangkaiyue před 2 roky
rodič
revize
a634ea35f8

+ 7 - 0
src/web/templates/site/page/helpCenter/detail.html

@@ -43,6 +43,13 @@
     var length =  $('summary.active')
     // 滚动左侧菜单,使激活菜单始终在视图内
     $('.s-tree').scrollTop(activeTop)
+
+    $(".s-content img").each(function(){
+      var imgsrc = $(this).attr("src");
+      if(imgsrc.indexOf("://") < 0){
+        $(this).attr("src",{{Msg "seo" "jyadd"}}+imgsrc)
+      }
+    })
   })
 
   function getTree(data) {