fix: 🧩 修复bug

This commit is contained in:
2025-04-01 15:15:35 +08:00
parent 716b383a87
commit af5894dd5a
25 changed files with 112 additions and 82 deletions

View File

@@ -103,51 +103,6 @@
}
</script>
<script type="module" src="/src/main.ts"></script>
<script>
// let gwUser = JSON.parse(localStorage.getItem("gw-user"));
// if (gwUser) {
// const { phpToken, refreshToken } = gwUser;
// function offline() {
// const pathurl = localStorage.getItem("baseUrl") + `uc/offline`;
// fetch(pathurl, {
// method: "POST",
// credentials: "include",
// keepalive: true,
// headers: {
// Authorization: phpToken,
// "Refresh-Authorization": refreshToken
// }
// });
// }
// window.onbeforeunload = function (e) {
// offline();
// };
// var ua = window.navigator.userAgent.toLowerCase();
// var rkn =
// /\b(opera|chrome|webkit|safari|msie|firefox|gecko|qqbrowser|edg)\b(\s*(version|rv:|\/)*(\d+(\.\d+)*))?/g;
// window.addEventListener("mouseover", function () {
// window.removeEventListener("beforeunload", offline, true);
// ua.replace(rkn, function (match, type, all, rv, version) {
// if (type == "chrome" && parseInt(version) <= 86) {
// window.removeEventListener("unload", offline, true);
// }
// });
// });
// window.addEventListener("mouseout", function () {
// window.addEventListener("beforeunload", offline, true);
// ua.replace(rkn, function (match, type, all, rv, version) {
// if (type == "qqbrowser" || type == "edg" || (type == "chrome" && parseInt(version) <= 86)) {
// window.addEventListener("unload", offline, true);
// }
// });
// });
// if (window.location.pathnam !== "/login") {
// window.removeEventListener("beforeunload", offline);
// window.removeEventListener("unload", offline);
// }
// }
</script>
<script></script>
</body>
</html>