fix: 🧩 修复bug
This commit is contained in:
47
index.html
47
index.html
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user