From 59211ab2e3be51c7a6dea557eee937736e9f3b24 Mon Sep 17 00:00:00 2001 From: LingYuZhao Date: Fri, 12 Apr 2024 18:04:01 +0800 Subject: [PATCH] Update main.js --- web/js/main.js | 42 ++++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/web/js/main.js b/web/js/main.js index 303e506..1925290 100644 --- a/web/js/main.js +++ b/web/js/main.js @@ -209,26 +209,28 @@ window.onload = function () { // 转存查询 setInterval(() => { - diskMirror.transferDepositStatus({userId: userId, type: type}, (res) => { - transferDeposit_fileList_table.innerHTML = ''; - for (const fileName in res) { - const tr = document.createElement("tr"); - tr.className = "row0"; - const td0 = document.createElement("td"); - const span0 = document.createElement("span"); - span0.innerText = ''; - span0.className = 'load-icon' - const span1 = document.createElement("span"); - span1.innerText = ' ' + fileName; - td0.appendChild(span0); - td0.appendChild(span1); - tr.appendChild(td0); - const td1 = document.createElement("td"); - td1.innerText = res[fileName]; - tr.appendChild(td1); - transferDeposit_fileList_table.appendChild(tr); - } - }, (_) => jokerBoxPopUp.show('无法与转存状态服务连接,请检查网络或diskMirror服务器版本是否 >= 1.2.0')) + if (isShowTransferDeposit_fileList_table) { + diskMirror.transferDepositStatus({userId: userId, type: type}, (res) => { + transferDeposit_fileList_table.innerHTML = ''; + for (const fileName in res) { + const tr = document.createElement("tr"); + tr.className = "row0"; + const td0 = document.createElement("td"); + const span0 = document.createElement("span"); + span0.innerText = ''; + span0.className = 'load-icon' + const span1 = document.createElement("span"); + span1.innerText = ' ' + fileName; + td0.appendChild(span0); + td0.appendChild(span1); + tr.appendChild(td0); + const td1 = document.createElement("td"); + td1.innerText = res[fileName]; + tr.appendChild(td1); + transferDeposit_fileList_table.appendChild(tr); + } + }, (_) => jokerBoxPopUp.show('无法与转存状态服务连接,请检查网络或diskMirror服务器版本是否 >= 1.2.0')); + } }, 5000) document.querySelector("#diskMirrorBackPath").addEventListener("click", () => fsList.toBackPath());