From aff4ca59ab80743a36a3114afcfaee3dceffc187 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E9=B1=BC=E5=BC=80=E5=8F=91?= Date: Sun, 17 May 2026 20:48:57 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=88=9B=E4=BD=9C=E4=B8=BB=E9=A2=98?= =?UTF-8?q?=E4=BF=9D=E5=AD=98/=E5=8A=A0=E8=BD=BD=20+=20=E6=94=AF=E4=BB=98?= =?UTF-8?q?=E4=BA=8C=E7=BB=B4=E7=A0=81=E8=BF=87=E6=9C=9F=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - ScriptCreation: 大类/小类 selection 持久化到 project meta - ProjectMeta: 新增 subcategoryCode 字段 - projectStore: 新增 setSubcategoryCode action - localStorage: orderedMeta 补全 categoryCode/subcategoryCode - RechargeModal: 过期后点击'我已支付'给出 toast 提示,按钮禁用并显示'二维码已过期' --- tauri-app/src/api/modules/localStorage.ts | 2 ++ .../RechargeModal/RechargeModal.tsx | 9 +++---- .../pages/VideoCreation/ScriptCreation.tsx | 24 +++++++++++++++++-- tauri-app/src/store/projectStore.ts | 8 +++++++ tauri-app/src/types/project.ts | 1 + tauri-app/src/utils/projectMeta.ts | 1 + 6 files changed, 39 insertions(+), 6 deletions(-) diff --git a/tauri-app/src/api/modules/localStorage.ts b/tauri-app/src/api/modules/localStorage.ts index 925a9ff..371fc7a 100644 --- a/tauri-app/src/api/modules/localStorage.ts +++ b/tauri-app/src/api/modules/localStorage.ts @@ -93,6 +93,8 @@ export const localProjectApi = { id: meta.id, title: meta.title, topic: meta.topic, + categoryCode: meta.categoryCode, + subcategoryCode: meta.subcategoryCode, status: meta.status, currentStep: meta.currentStep, createdAt: meta.createdAt, diff --git a/tauri-app/src/components/RechargeModal/RechargeModal.tsx b/tauri-app/src/components/RechargeModal/RechargeModal.tsx index abfe327..d4d04e1 100644 --- a/tauri-app/src/components/RechargeModal/RechargeModal.tsx +++ b/tauri-app/src/components/RechargeModal/RechargeModal.tsx @@ -179,10 +179,11 @@ export default function RechargeModal({ const orderId = orderIdRef.current; if (!orderId) {return;} - // 二维码已过期,直接提示 - if (Date.now() >= expireAtRef.current) { + // 二维码已过期,明确提示用户 + if (isExpired || Date.now() >= expireAtRef.current) { clearTimers(); setIsExpired(true); + toast.info('二维码已过期,请点击刷新二维码或重新下单'); return; } @@ -353,9 +354,9 @@ export default function RechargeModal({