const getModeRealInfo = () => { let modeReal = parseInt(localStorage.getItem("modeReal")) === 0 ? 0 : 1; const powerControl = localStorage.getItem("powerControl"); let loadMode = parseInt(localStorage.getItem("loadMode")) === 1 ? 1 : 0; let text; if (modeReal === 0) { if (powerControl === "导纳" || !powerControl) { text = "虚拟模式:导纳"; } else { text = "虚拟模式:力位混合"; } } else { if (loadMode === 1) { text = "循环模式"; } else { text = '常规' } } return text; } document.addEventListener("DOMContentLoaded", function () { const modeRealInfo = document.getElementById("mode-real-info"); const infoText = document.getElementById("info-text"); const modeRealText = getModeRealInfo(); if (modeRealText === '常规') { modeRealInfo.style.display = "none"; } else { modeRealInfo.style.display = "flex"; infoText.innerHTML = modeRealText; } })