Browse Source

wip:图片增加域名

wangkaiyue 2 years ago
parent
commit
a634ea35f8
1 changed files with 7 additions and 0 deletions
  1. 7 0
      src/web/templates/site/page/helpCenter/detail.html

+ 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) {