Fix/52 首页用户管理交互调整 #2

Closed
kxswman wants to merge 5 commits from fix/52-首页用户管理交互调整 into main
5 changed files with 16 additions and 3 deletions
Showing only changes of commit 1834b97fe2 - Show all commits
@@ -9,6 +9,7 @@
"originalPrice": "Original Price (Monthly)", "originalPrice": "Original Price (Monthly)",
"price": "Price", "price": "Price",
"productDiscount": "Product Discount", "productDiscount": "Product Discount",
"promoDiscount": "Promo Discount",
"total": "Total" "total": "Total"
}, },
"buy": "Buy", "buy": "Buy",
@@ -9,6 +9,7 @@
"originalPrice": "原价(按月)", "originalPrice": "原价(按月)",
"price": "价格", "price": "价格",
"productDiscount": "商品折扣", "productDiscount": "商品折扣",
"promoDiscount": "促销优惠",
"total": "总价" "total": "总价"
}, },
"buy": "购买", "buy": "购买",
@@ -10,6 +10,7 @@ interface SubscribeBillingProps {
unit_price: number; unit_price: number;
unit_time: string; unit_time: string;
subscribe_discount: number; subscribe_discount: number;
promo_discount: number;
show_original_price?: boolean; show_original_price?: boolean;
} }
>; >;
@@ -66,6 +67,14 @@ export function SubscribeBilling({ order }: Readonly<SubscribeBillingProps>) {
<Display type="currency" value={order?.discount} /> <Display type="currency" value={order?.discount} />
</span> </span>
</li> </li>
<li>
<span className="text-muted-foreground">
{t("billing.promoDiscount", "Promo Discount")}
</span>
<span>
<Display type="currency" value={order?.promo_discount} />
</span>
</li>
<li> <li>
<span className="text-muted-foreground"> <span className="text-muted-foreground">
{t("billing.couponDiscount", "Coupon Discount")} {t("billing.couponDiscount", "Coupon Discount")}
@@ -18,10 +18,10 @@ export function PromoInfo({ discount }: Readonly<PromoInfoProps>) {
<span className="font-medium"> <span className="font-medium">
{promo.rule_name || t("promo.available", "Promo Available")} {promo.rule_name || t("promo.available", "Promo Available")}
</span> </span>
{promo.end_time && ( {promo.expires_at && (
<span className="text-muted-foreground text-xs"> <span className="text-muted-foreground text-xs">
{t("promo.validUntil", "Valid until")}:{" "} {t("promo.validUntil", "Valid until")}:{" "}
{new Date(promo.end_time * 1000).toLocaleString()} {new Date(promo.expires_at * 1000).toLocaleString()}
</span> </span>
)} )}
</div> </div>
+3 -1
View File
@@ -548,6 +548,7 @@ declare namespace API {
price: number; price: number;
amount: number; amount: number;
discount: number; discount: number;
promo_discount: number;
gift_amount: number; gift_amount: number;
coupon: string; coupon: string;
coupon_discount: number; coupon_discount: number;
@@ -1024,8 +1025,9 @@ declare namespace API {
type SubscribeDiscountPromo = { type SubscribeDiscountPromo = {
rule_name?: string; rule_name?: string;
rule_type?: string;
promo_price: number; promo_price: number;
end_time?: number; expires_at?: number;
}; };
type SubscribeGroup = { type SubscribeGroup = {