From ec401f5784a74f9b3ee753936fb3ffa571adac99 Mon Sep 17 00:00:00 2001 From: Anshiii Date: Tue, 21 May 2019 20:06:39 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=B0=86=E8=B0=83=E7=94=A8=E9=97=B4?= =?UTF-8?q?=E9=9A=94=E6=94=B9=E4=B8=BA=E5=B8=B8=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/src/main/assets/WebViewJavascriptBridge.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/library/src/main/assets/WebViewJavascriptBridge.js b/library/src/main/assets/WebViewJavascriptBridge.js index 749c617..27743b9 100644 --- a/library/src/main/assets/WebViewJavascriptBridge.js +++ b/library/src/main/assets/WebViewJavascriptBridge.js @@ -20,6 +20,7 @@ var lastCallTime = 0; var stoId = null; + var FETCH_QUEUE_INTERVAL = 20; // 创建消息index队列iframe function _createQueueReadyIframe(doc) { @@ -85,9 +86,9 @@ } // _fetchQueue 的调用间隔过短,延迟调用 - if (new Date().getTime() - lastCallTime < 20) { + if (new Date().getTime() - lastCallTime < FETCH_QUEUE_INTERVAL) { if (!stoId) { - stoId = setTimeout(_fetchQueue, 20); + stoId = setTimeout(_fetchQueue, FETCH_QUEUE_INTERVAL); } return; }