Browse Source

底部外部引入恢复

anderx 4 years ago
parent
commit
beec392a36
1 changed files with 15 additions and 0 deletions
  1. 15 0
      src/main/webapp/WEB-INF/views/common.html

+ 15 - 0
src/main/webapp/WEB-INF/views/common.html

@@ -665,6 +665,21 @@
         /*]]>*/
     </script>
 
+    <script th:if="${type}!='houtai'">
+        var _hmt = _hmt || [];
+        (function() {
+            var hm = document.createElement("script");
+            if((navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i))) {
+                hm.src = "https://hm.baidu.com/hm.js?c2a7fd3c1093d8dbd0be9106b4027797"; //移动
+                document.getElementById('onlineConsultation').onclick=function(){document.getElementById('nb_toolbar_onlineConsult').click()}
+            }else{
+                hm.src = "https://hm.baidu.com/hm.js?e20e700f2bb1656e3253cb466c60f15b"; //pc
+            }
+            var s = document.getElementsByTagName("script")[0];
+            s.parentNode.insertBefore(hm, s);
+        })();
+    </script>
+
     <script th:src="${portalHost+'/js/swiper/swiper.min.js'}"></script>
 
     <th:block th:replace="${scripts}" />