function loadMainDartJs() { if (scriptLoaded) { return; } //hideSplash(); scriptLoaded = true; // document.getElementsByTagName('base')[0].setAttribute("href", window.STATIC_ROOT); var scriptTag = document.createElement("script"); scriptTag.src = window.STATIC_ROOT + "main.dart.js?v=" + serviceWorkerVersion; scriptTag.type = "application/javascript"; document.body.append(scriptTag); } function loadVersion(callback) { fetch("version.json?d=" + serviceWorkerVersion) .then(function (res) { return res.json() }) .then(function (data) { window.FLYINSONO_VERSION = data; callback && callback(); }); } ///外部通知 function externalNotification(a, b) { window.invokeJs(a, b); } function closeSlaveWindow() { var shell = window["FisShellApi"]; if (shell) { shell.closeSlaveWindow(); } } function beginWindowDrag(name) { var shell = window["FisShellApi"]; if (shell) { shell.beginWindowDrag(name); } } function endWindowDrag(name) { var shell = window["FisShellApi"]; if (shell) { shell.endWindowDrag(name); } } function closeWindow(name) { var shell = window["FisShellApi"]; if (shell) { shell.closeWindow(name); } } function maximizeWindow(name) { var shell = window["FisShellApi"]; if (shell) { shell.maximizeWindow(name); } } function minimizeWindow(name) { var shell = window["FisShellApi"]; if (shell) { shell.minimizeWindow(name); } } ///打印pdf function printPdfByBase64(base64) { printJS({ printable: base64, type: "pdf", base64: true, }); } function closeWindow(windowType) { var shell = window["FisShellApi"]; if (shell) { shell.closeWindow(windowType); } } function getLanguageCode(callback) { var shell = window["FisShellApi"]; if (shell) { var request = shell.getLanguageCode(); request.then((v) => callback(v)); } } function closeSlaveWindow() { var shell = window["FisShellApi"]; if (shell) { shell.closeSlaveWindow(); } } function beginWindowDrag(name) { var shell = window["FisShellApi"]; if (shell) { shell.beginWindowDrag(name); } } function endWindowDrag(name) { var shell = window["FisShellApi"]; if (shell) { shell.endWindowDrag(name); } } function closeWindow(name) { var shell = window["FisShellApi"]; if (shell) { shell.closeWindow(name); } } function maximizeWindow(name) { var shell = window["FisShellApi"]; if (shell) { shell.maximizeWindow(name); } } function minimizeWindow(name) { var shell = window["FisShellApi"]; if (shell) { shell.minimizeWindow(name); } } window.addEventListener("flutter-first-frame", function () { console.log("flutter-first-frame"); }); function loadService() { if ("serviceWorker" in navigator) { // Service workers are supported. Use them. window.addEventListener("load", function () { // Wait for registration to finish before dropping the