Explorar o código

dingding js 监控加入对本地调试环境的排除

seyason %!s(int64=3) %!d(string=hai) anos
pai
achega
ec97648f4f
Modificáronse 1 ficheiros con 7 adicións e 1 borrados
  1. 7 1
      fhKeeper/formulahousekeeper/timesheet_h5/public/index.html

+ 7 - 1
fhKeeper/formulahousekeeper/timesheet_h5/public/index.html

@@ -13,7 +13,13 @@
     <!-- <script src="../src/assets/axios.min.js"></script> -->
     <!-- <script src="https://unpkg.com/axios/dist/axios.min.js"></script> -->
     <script src="./axios.min.js"></script> 
-    <meta name="wpk-bid" content="dta_2_71020"> <script>    !(function(c,i,e,b){var h=i.createElement("script");var f=i.getElementsByTagName("script")[0];h.type="text/javascript";h.crossorigin=true;h.onload=function(){c[b]||(c[b]=new c.wpkReporter({bid:"dta_2_71020"}));c[b].installAll()};f.parentNode.insertBefore(h,f);h.src=e})(window,document,"https://g.alicdn.com/woodpeckerx/jssdk??wpkReporter.js","__wpk");</script>
+    <meta name="wpk-bid" content="dta_2_71020"> <script>var isDingtalk = navigator && /DingTalk/.test(navigator.userAgent);var isProductEnv = window &&window.location &&window.location.host 
+        && window.location.host.indexOf('//127.0.0.1')===-1
+        && window.location.host.indexOf('//localhost')===-1
+        && window.location.host.indexOf('//192.168.')===-1
+        // 如果有其它测试域名,请一起排掉,减少测试环境对生产环境监控的干扰
+    if (isProductEnv) {    !(function(c,i,e,b){var h=i.createElement("script");var f=i.getElementsByTagName("script")[0];h.type="text/javascript";h.crossorigin=true;h.onload=function(){c[b]||(c[b]=new c.wpkReporter({bid:"dta_2_71020"}));c[b].installAll()};f.parentNode.insertBefore(h,f);h.src=e})(window,document,"https://g.alicdn.com/woodpeckerx/jssdk??wpkReporter.js","__wpk"); }</script>
+
     <script>
         function IsPC() { 
             var userAgentInfo = navigator.userAgent;