From 623e3d527f20135a61e0691d0bf079798b3b3d47 Mon Sep 17 00:00:00 2001 From: Eamon <17516219072@163.com> Date: Wed, 19 Aug 2026 13:45:18 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E7=AB=8B=E5=8D=B3=E8=B4=AD?= =?UTF-8?q?=E4=B9=B0=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/home/product/buy.tsx | 1057 +++++++++++-------------------- src/home/softDownload/index.tsx | 2 +- 2 files changed, 355 insertions(+), 704 deletions(-) diff --git a/src/home/product/buy.tsx b/src/home/product/buy.tsx index 9411583..463da99 100644 --- a/src/home/product/buy.tsx +++ b/src/home/product/buy.tsx @@ -1,15 +1,8 @@ -import { useCallback, useEffect, useRef, useState } from "react" +import { useState } from "react" import { useLocation, useNavigate } from "react-router-dom" import { toast } from "sonner" -import type { CreateOrderData } from "@/api/order" -import { checkPayStatus, createOrder, createTestAccount } from "@/api/order" +import { createOrder } from "@/api/order" import { Button } from "@/components/ui/button" -import { - Dialog, - DialogContent, - DialogHeader, - DialogTitle, -} from "@/components/ui/dialog" import { Input } from "@/components/ui/input" import { Label } from "@/components/ui/label" import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group" @@ -23,6 +16,9 @@ import { import Wrap from "@/components/wrap" import type { Product } from "@/lib/models/product" import { cn } from "@/lib/utils" +import alipay from "../_assets/alipay.svg" +import balance from "../_assets/balance.svg" +import wechat from "../_assets/wechat.svg" // ============ 工具函数 ============ function randomChars(length: number): string { @@ -42,46 +38,7 @@ function randomDigits(length: number): string { return result } -// ============ 类型定义 ============ -type PaymentState = { - orderData: CreateOrderData - polling: boolean -} - -// ============ 子组件 ============ - -// 价格卡片组件 -function PriceCard({ product, isTest }: { product: Product; isTest: boolean }) { - return ( -