From 482077c862755d538e5513b8a98bb0471128c7ad Mon Sep 17 00:00:00 2001 From: AoXuan Date: Tue, 9 Sep 2025 21:16:26 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E5=90=8E=E7=AB=AFgit=E7=89=88=E6=9C=AC=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=8F=8A=E7=9B=B8=E5=85=B3=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/api/index.ts | 1 + frontend/src/api/models/VersionOut.ts | 35 +++++++++++++++++++++++++++ frontend/src/api/services/Service.ts | 12 +++++++++ 3 files changed, 48 insertions(+) create mode 100644 frontend/src/api/models/VersionOut.ts diff --git a/frontend/src/api/index.ts b/frontend/src/api/index.ts index 6606c56..8bdd32b 100644 --- a/frontend/src/api/index.ts +++ b/frontend/src/api/index.ts @@ -111,5 +111,6 @@ export type { UserReorderIn } from './models/UserReorderIn'; export type { UserSetIn } from './models/UserSetIn'; export type { UserUpdateIn } from './models/UserUpdateIn'; export type { ValidationError } from './models/ValidationError'; +export type { VersionOut } from './models/VersionOut'; export { Service } from './services/Service'; diff --git a/frontend/src/api/models/VersionOut.ts b/frontend/src/api/models/VersionOut.ts new file mode 100644 index 0000000..ff9c990 --- /dev/null +++ b/frontend/src/api/models/VersionOut.ts @@ -0,0 +1,35 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type VersionOut = { + /** + * 状态码 + */ + code?: number; + /** + * 操作状态 + */ + status?: string; + /** + * 操作消息 + */ + message?: string; + /** + * 后端代码是否为最新 + */ + if_latest: boolean; + /** + * 后端代码当前哈希值 + */ + current_hash: string; + /** + * 后端代码当前时间戳 + */ + current_time: string; + /** + * 后端当前版本号 + */ + current_version: string; +}; + diff --git a/frontend/src/api/services/Service.ts b/frontend/src/api/services/Service.ts index ebe3a08..44d7598 100644 --- a/frontend/src/api/services/Service.ts +++ b/frontend/src/api/services/Service.ts @@ -63,10 +63,22 @@ import type { UserInBase } from '../models/UserInBase'; import type { UserReorderIn } from '../models/UserReorderIn'; import type { UserSetIn } from '../models/UserSetIn'; import type { UserUpdateIn } from '../models/UserUpdateIn'; +import type { VersionOut } from '../models/VersionOut'; import type { CancelablePromise } from '../core/CancelablePromise'; import { OpenAPI } from '../core/OpenAPI'; import { request as __request } from '../core/request'; export class Service { + /** + * 获取后端git版本信息 + * @returns VersionOut Successful Response + * @throws ApiError + */ + public static getGitVersionApiInfoVersionPost(): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/api/info/version', + }); + } /** * 获取关卡号下拉框信息 * @param requestBody