From 4e97e706fdf2132a067c04434e00db4854d18bbb Mon Sep 17 00:00:00 2001 From: Stringadmin Date: Mon, 8 Jun 2026 18:30:05 +0800 Subject: [PATCH] Add beta application email fields --- src/api/betaApplicationClient.ts | 4 ++++ src/components/BetaApplicationModal.tsx | 18 ++++++++++++------ .../beta-applications/BetaApplicationsPage.tsx | 2 ++ 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/src/api/betaApplicationClient.ts b/src/api/betaApplicationClient.ts index f0ad467..39921b2 100644 --- a/src/api/betaApplicationClient.ts +++ b/src/api/betaApplicationClient.ts @@ -2,6 +2,7 @@ import { serverRequest } from "./serverConnection"; export interface BetaApplicationInput { name: string; + email: string; phone: string; wechat: string; industry: string; @@ -16,6 +17,7 @@ export interface BetaApplicationInput { wantFeature: string[]; selfStatement: string; signature: string; + applicationDate: string; agreeRules: boolean; } @@ -72,6 +74,7 @@ function normalizeApplication(raw: unknown): BetaApplicationItem { userId: readNumberOrNull(item.userId), username: readNullableString(item.username), name: readString(item.name), + email: readString(item.email), phone: readString(item.phone), wechat: readString(item.wechat), industry: readString(item.industry), @@ -86,6 +89,7 @@ function normalizeApplication(raw: unknown): BetaApplicationItem { wantFeature: readStringArray(item.wantFeature), selfStatement: readString(item.selfStatement), signature: readString(item.signature), + applicationDate: readString(item.applicationDate), agreeRules: item.agreeRules === true, status: normalizeStatus(item.status), inviteCode: readNullableString(item.inviteCode), diff --git a/src/components/BetaApplicationModal.tsx b/src/components/BetaApplicationModal.tsx index 850dff2..619082a 100644 --- a/src/components/BetaApplicationModal.tsx +++ b/src/components/BetaApplicationModal.tsx @@ -10,6 +10,7 @@ interface BetaApplicationModalProps { /* ── Form state ── */ interface BetaFormData { name: string; + email: string; phone: string; wechat: string; industry: string; @@ -24,11 +25,13 @@ interface BetaFormData { wantFeature: string[]; selfStatement: string; signature: string; + applicationDate: string; agreeRules: boolean; } const INITIAL_FORM: BetaFormData = { name: "", + email: "", phone: "", wechat: "", industry: "", @@ -43,6 +46,7 @@ const INITIAL_FORM: BetaFormData = { wantFeature: [], selfStatement: "", signature: "", + applicationDate: "", agreeRules: false, }; @@ -156,10 +160,12 @@ const BetaApplicationModal = ({ open, onClose }: BetaApplicationModalProps) => { const validate = () => { if (!form.name.trim()) return "请填写姓名 / 常用昵称"; + if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(form.email.trim())) return "请填写用于接收内测码的有效邮箱"; if (!form.phone.trim()) return "请填写联系手机号码"; if (!form.wechat.trim()) return "请填写微信账号"; if (!form.selfStatement.trim()) return "请填写申请自述"; if (!form.signature.trim()) return "请填写申请人确认签字"; + if (!form.applicationDate.trim()) return "请填写申请日期"; if (!form.agreeRules) return "请先阅读并同意内测规则"; return null; }; @@ -178,6 +184,7 @@ const BetaApplicationModal = ({ open, onClose }: BetaApplicationModalProps) => { await betaApplicationClient.submit({ ...form, name: form.name.trim(), + email: form.email.trim(), phone: form.phone.trim(), wechat: form.wechat.trim(), industry: form.industry.trim(), @@ -190,9 +197,10 @@ const BetaApplicationModal = ({ open, onClose }: BetaApplicationModalProps) => { feedbackWilling: form.feedbackWilling.trim(), selfStatement: form.selfStatement.trim(), signature: form.signature.trim(), + applicationDate: form.applicationDate.trim(), }); setForm(INITIAL_FORM); - setMessage({ tone: "success", text: "申请已提交,请留意站内通知。" }); + setMessage({ tone: "success", text: "申请已提交,请留意预留邮箱中的审核结果。" }); } catch (error) { setMessage({ tone: "error", text: error instanceof Error ? error.message : "提交内测申请失败" }); } finally { @@ -229,6 +237,7 @@ const BetaApplicationModal = ({ open, onClose }: BetaApplicationModalProps) => {

一、个人基础信息

update("name", v)} /> + update("email", v)} placeholder="审核通过后内测码将发送到此邮箱" /> update("phone", v)} /> update("wechat", v)} /> update("industry", v)} /> @@ -297,7 +306,7 @@ const BetaApplicationModal = ({ open, onClose }: BetaApplicationModalProps) => {
  • 内测赠送 500 元等值 50,000 积分,仅限内测期间使用,不可提现、不可转让、不可兑换现金;
  • 内测版本含未上线测试功能,存在功能不稳定、界面调整、参数优化等情况,申请人自愿理解包容;
  • 严禁私自泄露内测专属工作流、内部功能、测试接口、未发布技术方案等内部资料;
  • -
  • 审核通过后,官方将在 48 小时 内发放内测账号、登录权限及免费积分;
  • +
  • 审核通过后,官方将在 48 小时 内通过预留邮箱发放内测码、登录权限及免费积分;
  • 正式版上线后,优质内测体验官可享受专属永久优惠权限与平台荣誉称号。
  • @@ -312,10 +321,7 @@ const BetaApplicationModal = ({ open, onClose }: BetaApplicationModalProps) => {
    update("signature", v)} placeholder="请签署姓名" /> -
    - 申请填写日期 - -
    + update("applicationDate", v)} placeholder="例如:2026年6月8日" />
    diff --git a/src/features/beta-applications/BetaApplicationsPage.tsx b/src/features/beta-applications/BetaApplicationsPage.tsx index c6a0cf2..e4efccb 100644 --- a/src/features/beta-applications/BetaApplicationsPage.tsx +++ b/src/features/beta-applications/BetaApplicationsPage.tsx @@ -214,6 +214,7 @@ export default function BetaApplicationsPage({ session, onOpenLogin }: BetaAppli

    一、个人基础信息

    + @@ -248,6 +249,7 @@ export default function BetaApplicationsPage({ session, onOpenLogin }: BetaAppli

    {selectedApplication.selfStatement || "未填写"}

    +