Jelajahi Sumber

尝试屏蔽js异常

Lijy 2 tahun lalu
induk
melakukan
eec7823af0
1 mengubah file dengan 10 tambahan dan 6 penghapusan
  1. 10 6
      fhKeeper/formulahousekeeper/timesheet_h5/public/index.html

+ 10 - 6
fhKeeper/formulahousekeeper/timesheet_h5/public/index.html

@@ -17,17 +17,21 @@
     <!-- 引入企业微信js -->
     <script src="https://res.wx.qq.com/open/js/jweixin-1.2.0.js" referrerpolicy="origin"></script>
     <script src="https://open.work.weixin.qq.com/wwopen/js/jwxwork-1.0.0.js" referrerpolicy="origin"></script>
-    <script>
-        window.onerror = function(err) {
-            return true
+    <script language="javascript"> 
+        function killerrors() {
+            return true;
         }
-    </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.onerror = killerrors;
+      </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>
+        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() {