From 287fb114d24eb16418e119f45f920eb3b6f79a89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=B4=E5=9E=9A=20=E8=8C=83?= <2664438031@qq.com> Date: Wed, 24 Jun 2026 18:04:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=83=A8=E5=88=86=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/auth-api.ts | 2 +- src/components/mod-codes/index.tsx | 3 +- src/constant/slots.json | 8 ++-- src/layout/hero-layout/index.tsx | 4 +- src/page/firearms/index.tsx | 66 +++++++++++++++--------------- 5 files changed, 44 insertions(+), 39 deletions(-) diff --git a/src/api/auth-api.ts b/src/api/auth-api.ts index 1727cde..2fb9700 100644 --- a/src/api/auth-api.ts +++ b/src/api/auth-api.ts @@ -9,5 +9,5 @@ export async function login(loginRequest: LoginRequest): Promise { } export async function logout() { - await WebClient.get("/auth/logout") + await WebClient.post("/auth/logout") } diff --git a/src/components/mod-codes/index.tsx b/src/components/mod-codes/index.tsx index 39fe7b8..2132083 100644 --- a/src/components/mod-codes/index.tsx +++ b/src/components/mod-codes/index.tsx @@ -267,7 +267,8 @@ export default function ModCodes({ firearmId }: ModCodesProps) { {tuning.tuningName || "未命名"}: {tuning.tuningValue ?? "-"} diff --git a/src/constant/slots.json b/src/constant/slots.json index d75873b..faa8bca 100644 --- a/src/constant/slots.json +++ b/src/constant/slots.json @@ -1,6 +1,7 @@ [ "枪口", "枪管", + "导轨脚架", "贴片", "瞄准镜", "战术设备", @@ -9,11 +10,10 @@ "枪托", "托腮板", "枪托套件", - "导轨脚架", "前握把", + "弹匣", + "弹匣座", "后握把", "后握贴片", - "握把座", - "弹匣", - "弹匣座" + "握把座" ] diff --git a/src/layout/hero-layout/index.tsx b/src/layout/hero-layout/index.tsx index c222751..face29c 100644 --- a/src/layout/hero-layout/index.tsx +++ b/src/layout/hero-layout/index.tsx @@ -50,6 +50,8 @@ export default function HeroLayout() { const localDate = new Date(user.expiration.replace(' ', 'T')); const targetTimestamp = localDate.getTime(); if (targetTimestamp > Date.now()) { + console.log("未到自动登出时间"); + scheduleAutoLogout(targetTimestamp, performLogout); } else { // 已过期立即登出 @@ -192,7 +194,7 @@ export default function HeroLayout() {
-

© 2024-{today.year()} OnixByte。

+

© 2024-{today.year()} OnixByte。湘ICP备2026000274号-1

diff --git a/src/page/firearms/index.tsx b/src/page/firearms/index.tsx index 926c168..bd3a843 100644 --- a/src/page/firearms/index.tsx +++ b/src/page/firearms/index.tsx @@ -181,7 +181,41 @@ export default function FirearmsPage() { + + {firearm.name} + + + {firearmTypeText[firearm.type]} + + + } extra={ + user ? (