Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a6246c2453 | |||
| 09c5216f60 | |||
| 4d84095af2 | |||
| d66b664198 | |||
| a7d89acc7f |
@@ -55,6 +55,12 @@ const rejectSchema = z.object({
|
||||
.max(500, "拒绝原因不能超过 500 个字符"),
|
||||
});
|
||||
|
||||
function toOptionalNumber(value?: string) {
|
||||
if (!value) return;
|
||||
const parsed = Number(value);
|
||||
return Number.isFinite(parsed) ? parsed : undefined;
|
||||
}
|
||||
|
||||
function QrCodeCell({ url }: { url?: string }) {
|
||||
const [zoomOpen, setZoomOpen] = useState(false);
|
||||
if (!url) return <span>--</span>;
|
||||
@@ -309,9 +315,9 @@ export default function WithdrawalPage() {
|
||||
const { data } = await getWithdrawalList({
|
||||
page: pagination.page,
|
||||
size: pagination.size,
|
||||
status: filter.status ? Number(filter.status) : undefined,
|
||||
method: filter.method ? Number(filter.method) : undefined,
|
||||
user_id: filter.user_id ? Number(filter.user_id) : undefined,
|
||||
status: toOptionalNumber(filter.status),
|
||||
method: toOptionalNumber(filter.method),
|
||||
user_id: toOptionalNumber(filter.user_id),
|
||||
});
|
||||
|
||||
return {
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
"originalPrice": "Original Price (Monthly)",
|
||||
"price": "Price",
|
||||
"productDiscount": "Product Discount",
|
||||
"promoDiscount": "Promo Discount",
|
||||
"total": "Total"
|
||||
},
|
||||
"buy": "Buy",
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
"originalPrice": "原价(按月)",
|
||||
"price": "价格",
|
||||
"productDiscount": "商品折扣",
|
||||
"promoDiscount": "促销优惠",
|
||||
"total": "总价"
|
||||
},
|
||||
"buy": "购买",
|
||||
|
||||
@@ -10,7 +10,6 @@ interface SubscribeBillingProps {
|
||||
unit_price: number;
|
||||
unit_time: string;
|
||||
subscribe_discount: number;
|
||||
promo_discount: number;
|
||||
show_original_price?: boolean;
|
||||
}
|
||||
>;
|
||||
@@ -67,14 +66,6 @@ export function SubscribeBilling({ order }: Readonly<SubscribeBillingProps>) {
|
||||
<Display type="currency" value={order?.discount} />
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span className="text-muted-foreground">
|
||||
{t("billing.promoDiscount", "Promo Discount")}
|
||||
</span>
|
||||
<span>
|
||||
<Display type="currency" value={order?.promo_discount} />
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span className="text-muted-foreground">
|
||||
{t("billing.couponDiscount", "Coupon Discount")}
|
||||
|
||||
@@ -18,10 +18,10 @@ export function PromoInfo({ discount }: Readonly<PromoInfoProps>) {
|
||||
<span className="font-medium">
|
||||
{promo.rule_name || t("promo.available", "Promo Available")}
|
||||
</span>
|
||||
{promo.expires_at && (
|
||||
{promo.end_time && (
|
||||
<span className="text-muted-foreground text-xs">
|
||||
{t("promo.validUntil", "Valid until")}:{" "}
|
||||
{new Date(promo.expires_at * 1000).toLocaleString()}
|
||||
{new Date(promo.end_time * 1000).toLocaleString()}
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
|
||||
+1
-3
@@ -548,7 +548,6 @@ declare namespace API {
|
||||
price: number;
|
||||
amount: number;
|
||||
discount: number;
|
||||
promo_discount: number;
|
||||
gift_amount: number;
|
||||
coupon: string;
|
||||
coupon_discount: number;
|
||||
@@ -1025,9 +1024,8 @@ declare namespace API {
|
||||
|
||||
type SubscribeDiscountPromo = {
|
||||
rule_name?: string;
|
||||
rule_type?: string;
|
||||
promo_price: number;
|
||||
expires_at?: number;
|
||||
end_time?: number;
|
||||
};
|
||||
|
||||
type SubscribeGroup = {
|
||||
|
||||
Reference in New Issue
Block a user