fix build macos

This commit is contained in:
2026-07-01 09:55:08 +07:00
parent 35d954ff0f
commit 248d3a6722
3 changed files with 3 additions and 2 deletions

View File

@@ -632,8 +632,9 @@ func (a *App) authStorageScanner() {
runtime.WindowExecJS(a.ctx, `
try {
const st = localStorage.getItem("student");
if (st) {
fetch("http://127.0.0.1:34115/login-success?data=" + encodeURIComponent(st));
if (st && !window.__redirecting) {
window.__redirecting = true;
window.location.href = "http://127.0.0.1:34115/login-success?data=" + encodeURIComponent(st);
}
} catch(e) {}
`)