更新移动端认证API,新增地理位置参数支持,优化登录逻辑以处理位置获取失败的情况,提升用户体验和代码可维护性。

This commit is contained in:
zyh
2025-04-10 06:55:47 +00:00
parent c4905113d7
commit 52c4e2d187
5 changed files with 44 additions and 10 deletions

View File

@@ -48,7 +48,7 @@ export interface MenuItem {
export interface AuthContextType {
user: User | null;
token: string | null;
login: (username: string, password: string) => Promise<void>;
login: (username: string, password: string, latitude?: number, longitude?: number) => Promise<void>;
logout: () => Promise<void>;
isAuthenticated: boolean;
isLoading: boolean;