From 777bfe70ed636e255c1ca9d40961c7a58a1826b7 Mon Sep 17 00:00:00 2001 From: zyh Date: Thu, 10 Apr 2025 06:59:14 +0000 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=A7=BB=E5=8A=A8=E7=AB=AFAP?= =?UTF-8?q?I=EF=BC=8C=E6=96=B0=E5=A2=9E=E7=99=BB=E5=BD=95=E4=BD=8D?= =?UTF-8?q?=E7=BD=AE=E7=9B=B8=E5=85=B3=E7=B1=BB=E5=9E=8B=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=EF=BC=8C=E4=BC=98=E5=8C=96=E7=B1=BB=E5=9E=8B=E7=BB=93=E6=9E=84?= =?UTF-8?q?=E4=BB=A5=E6=8F=90=E5=8D=87=E4=BB=A3=E7=A0=81=E5=8F=AF=E8=AF=BB?= =?UTF-8?q?=E6=80=A7=E5=92=8C=E5=8F=AF=E7=BB=B4=E6=8A=A4=E6=80=A7=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/mobile/api.ts | 6 +++--- client/share/types.ts | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 3 deletions(-) diff --git a/client/mobile/api.ts b/client/mobile/api.ts index c6ff6d1..bc55bc6 100644 --- a/client/mobile/api.ts +++ b/client/mobile/api.ts @@ -2,9 +2,9 @@ import axios from 'axios'; import type { MinioUploadPolicy, OSSUploadPolicy } from '@d8d-appcontainer/types'; import 'dayjs/locale/zh-cn'; import type { - User, FileLibrary, FileCategory, KnowInfo, - AuthContextType, ThemeContextType, Attachment, ThemeSettings, - SystemSetting, SystemSettingGroupData + User, FileLibrary, FileCategory, ThemeSettings, + SystemSetting, SystemSettingGroupData, + LoginLocation, LoginLocationDetail } from '../share/types.ts'; diff --git a/client/share/types.ts b/client/share/types.ts index 9f42d02..d34f7c1 100644 --- a/client/share/types.ts +++ b/client/share/types.ts @@ -408,3 +408,43 @@ export interface KnowInfo { /** 更新时间 */ updated_at: Date; } + +// 登录位置详细信息 +export interface LoginLocationDetail { + /** 记录ID */ + id: number; + /** 用户ID */ + user_id: number; + /** 登录时间 */ + login_time: string; + /** IP地址 */ + ip_address: string; + /** 用户代理 */ + user_agent: string; + /** 纬度 */ + latitude: number | null; + /** 经度 */ + longitude: number | null; + /** 位置名称 */ + location_name?: string; + /** 关联用户信息 */ + user?: { + id: number; + username: string; + nickname?: string; + }; +} + +// 登录位置信息 +export interface LoginLocation { + /** 纬度 */ + latitude: number | null; + /** 经度 */ + longitude: number | null; + /** IP地址 */ + ip_address?: string; + /** 用户代理 */ + user_agent?: string; + /** 登录时间 */ + login_time?: string; +}