style: 统一项目代码格式

This commit is contained in:
que01 committed 2026-09-19 18:37:00 +08:00
1 parent f0836ec056
commit 718d357d88
8 files changed
+1012 -117

No files matched your search

+11 -1
View File
@@ -10,7 +10,17 @@ if (root) {
event.preventDefault();
const username = (root.querySelector("#username") as HTMLInputElement).value;
const password = (root.querySelector("#password") as HTMLInputElement).value;
try { const client = new ApiClient({ baseUrl: import.meta.env.VITE_API_BASE_URL ?? "http://localhost:3001", fetcher: (input, init) => fetch(input, init) }); const result = await client.loginAdmin(username, password); localStorage.setItem("adminToken", result.token); location.reload(); } catch (error) { alert(error instanceof Error ? error.message : "登录失败"); }
try {
const client = new ApiClient({
baseUrl: import.meta.env.VITE_API_BASE_URL ?? "http://localhost:3001",
fetcher: (input, init) => fetch(input, init),
});
const result = await client.loginAdmin(username, password);
localStorage.setItem("adminToken", result.token);
location.reload();
} catch (error) {
alert(error instanceof Error ? error.message : "登录失败");
}
});
} else bootstrapAdmin(root);
}