浏览代码

wip:图片增加域名

wangkaiyue 2 年之前
父节点
当前提交
a634ea35f8
共有 1 个文件被更改,包括 7 次插入0 次删除
  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) {