更新 套餐信息

This commit is contained in:
moux1024 2025-09-26 21:04:10 +08:00
parent edc1587ef7
commit 339671c738
3 changed files with 64 additions and 43 deletions

View File

@ -62,6 +62,9 @@ function HomeModule5() {
{
title: string;
price: number;
originalPrice: number;
monthlyPrice: number;
discountMsg: string;
credits: string;
buttonText: string;
features: string[];
@ -75,6 +78,9 @@ function HomeModule5() {
billingType === "month"
? plan.price_month / 100
: plan.price_year / 100,
originalPrice: plan.price_month / 100,
monthlyPrice: billingType === "month" ? 0 : plan.price_year / 1200,
discountMsg: `Saves $${(plan.price_month * 12 - plan.price_year) / 100} by billing yearly!`,
credits: plan.description,
buttonText: plan.is_free ? "Try For Free" : "Subscribe Now",
issubscribed: plan.is_subscribed,
@ -226,7 +232,7 @@ function HomeModule5() {
xl:text-[3.375rem]
2xl:text-[3.75rem]"
>
${plan.price}
${plan.monthlyPrice || plan.price}
</span>
<span
className="text-white ml-2 whitespace-nowrap
@ -237,9 +243,12 @@ function HomeModule5() {
xl:text-xs
2xl:text-sm"
>
/ {billingType === "month" ? "month" : "year"}
/ month
</span>
</div>
{plan.originalPrice !== plan.price ? (<div className="pt-2 text-white text-sm line-through">
${plan.originalPrice}
</div>) : null}
</div>
<p
className="text-white mb-4
@ -288,7 +297,7 @@ function HomeModule5() {
xl:text-[0.75rem] xl:mb-[2rem]
2xl:text-sm 2xl:mb-[2.5rem]"
>
* Billed monthly until cancelled
* {plan.discountMsg}
</p>
<ul
className="space-y-2

View File

@ -1205,8 +1205,7 @@ function HomeModule4() {
}
/**价格方案 */
function HomeModule5() {
const [billingType, setBillingType] = useState<"month" | "year">("month");
const [billingType, setBillingType] = useState<"month" | "year">("year");
const [plans, setPlans] = useState<SubscriptionPlan[]>([]);
const { setShowCallbackModal } = useCallbackModal();
const pathname = usePathname();
@ -1228,6 +1227,9 @@ function HomeModule5() {
{
title: string;
price: number;
originalPrice: number;
monthlyPrice: number;
discountMsg: string;
credits: string;
buttonText: string;
features: string[];
@ -1241,6 +1243,9 @@ function HomeModule5() {
billingType === "month"
? plan.price_month / 100
: plan.price_year / 100,
originalPrice: plan.price_month / 100,
monthlyPrice: billingType === "month" ? 0 : plan.price_year / 1200,
discountMsg: `Saves $${(plan.price_month * 12 - plan.price_year) / 100} by billing yearly!`,
credits: plan.description,
buttonText: plan.is_free ? "Try For Free" : "Subscribe Now",
issubscribed: plan.is_subscribed,
@ -1372,7 +1377,7 @@ function HomeModule5() {
/* 大屏显示器按钮尺寸 */
2xl:w-[7.125rem] 2xl:text-base`}
>
Yearly - <span className="text-[#FFCC6D]">20%</span>
Yearly
</button>
</div>
</div>
@ -1438,6 +1443,7 @@ function HomeModule5() {
/* 大屏显示器间距 */
2xl:mb-[1.25rem]"
>
<div className="flex items-baseline">
<span
className="text-white font-bold
/* 移动端价格字体 */
@ -1453,10 +1459,10 @@ function HomeModule5() {
/* 大屏显示器价格字体 */
2xl:text-[3.75rem]"
>
${plan.price}
${plan.monthlyPrice || plan.price}
</span>
<span
className="text-white ml-2
className="text-white ml-2 whitespace-nowrap
/* 移动端单位字体 */
text-xs
/* 平板单位字体 */
@ -1470,9 +1476,15 @@ function HomeModule5() {
/* 大屏显示器单位字体 */
2xl:text-sm"
>
/ {billingType === "month" ? "mo" : "year"}
/ month
</span>
</div>
{plan.originalPrice !== plan.price ? (
<div className="pt-2 text-white text-sm line-through">
${plan.originalPrice}
</div>
) : null}
</div>
<p
className="text-white mb-4
/* 移动端描述字体 */
@ -1544,7 +1556,7 @@ function HomeModule5() {
/* 大屏显示器提示文字 */
2xl:text-sm 2xl:mb-[2.5rem]"
>
* Billed monthly until cancelled
* {plan.discountMsg}
</p>
<ul
className="space-y-2

View File

@ -99,7 +99,7 @@ const VideoCoverflow: React.FC<VideoCoverflowProps> = ({
>
{title}
</h2>
<p className="text-white font-normal text-center
<p className="text-white font-normal text-center mb-8
-mt-2
/* 移动端字体 */
text-[1rem] leading-[140%]
@ -138,7 +138,7 @@ const VideoCoverflow: React.FC<VideoCoverflowProps> = ({
} : {})}
onAfterInit={handleAfterInit}
onSlideChange={handleSlideChange}
className="w-full py-8"
className="w-full"
>
{videos.map((src, index) => (
<SwiperSlide key={src} className="select-none">