From bad1a6cbea20f4887eb5bf2a18dae65bdb8573fa Mon Sep 17 00:00:00 2001 From: liudongqi Date: Wed, 4 Sep 2024 14:31:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- routes/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/routes/index.js b/routes/index.js index 01d7467..c0e7450 100644 --- a/routes/index.js +++ b/routes/index.js @@ -60,7 +60,8 @@ function loadJs(window, jsText) { let js = ''; // 加载 页面上的js const allScript = window.document.querySelectorAll('script[r="m"]'); - allScript.forEach(script => { + for (let i = 0; i < allScript.length; i++) { + const script = allScript[i]; let attr = script.textContent; if (attr) { js += attr @@ -68,8 +69,7 @@ function loadJs(window, jsText) { js += jsText } js += ";\n" - console.log('js 加载--->', js) - }) + } return js; }