diff --git a/app/zone/pay/[zid]/[product_id]/[moment_id]/page.jsx b/app/zone/pay/[zid]/[product_id]/[moment_id]/page.jsx index 2a6a0d8..eb93542 100644 --- a/app/zone/pay/[zid]/[product_id]/[moment_id]/page.jsx +++ b/app/zone/pay/[zid]/[product_id]/[moment_id]/page.jsx @@ -3,7 +3,7 @@ import React, { useState, useEffect, useCallback } from "react"; import Divider from "@/components/Divider"; import Link from "next/link"; -import { Toast, Switch } from "antd-mobile"; +import { Toast, Switch, Image } from "antd-mobile"; import { generateSignature } from "@/utils/crypto"; import webviewBaseRequest from "@/utils/webviewBaseRequest"; import { useRouter, useSearchParams } from "next/navigation"; @@ -40,6 +40,7 @@ export default function Pay({ params }) { product_id: params.product_id, ...base, }; + // debugger; const signature = generateSignature(body); const response = await fetch( `/api/zone/get_cashier?signature=${signature}`, @@ -89,9 +90,13 @@ export default function Pay({ params }) { ); const temData = await response.json(); if (temData.ret === -1) return; - const superfanPriceList = temData.data?.superfan_price_list; + const superfanPriceList = temData.data?.superfan_price_list?.filter( + (it) => it.enable + ); if (superfanPriceList) { setSuperCheched({ index: 0, ...superfanPriceList[0] }); + } else { + setSuperCheched({ index: 0, ...temData.data }); } setSuperfanshipData(temData.data); } catch (error) { @@ -118,13 +123,13 @@ export default function Pay({ params }) { params.product_id === "h5_zone_superfanship" ? true : false ); const superId = superfanshipData?.superfan_price_list - ? superCheched?.period == 1 + ? superCheched?.period == 4 ? "h5_zone_superfanship_year" - : superCheched?.period == 2 - ? "h5_zone_superfanship_half_year" : superCheched?.period == 3 + ? "h5_zone_superfanship_half_year" + : superCheched?.period == 2 ? "h5_zone_superfanship_season" - : superCheched?.period == 4 + : superCheched?.period == 1 ? "h5_zone_superfanship_month" : "h5_zone_superfanship_eternal" : "h5_zone_superfanship"; @@ -143,7 +148,6 @@ export default function Pay({ params }) { from: searchParams.get("base") ? "web" : "app", }; setIsLoading(true); - const signature = generateSignature(body); try { const response = await fetch( @@ -229,82 +233,46 @@ export default function Pay({ params }) { )}
付费商品:
-- {checked ? superfanshipData?.name : data?.name} -
-有效期:
-+
付费商品:
+{checked ? superfanshipData?.name : data?.name}
+有效期:
++ {checked + ? superCheched?.period == 1 + ? "一个月" + : superCheched?.period == 2 + ? "三个月" + : superCheched?.period == 3 + ? "半年" + : superCheched?.period == 4 + ? "一年" + : "永久" + : data?.validity} +
+- {it.period == 0 - ? "永久" - : it.period == 1 - ? "年度" - : it.period == 2 - ? "半年" - : it.period == 3 - ? "季度" - : "月度"} - 超粉 -
-- ¥{it.price / 100} -
- {it.is_superfanship_give_wechat ? ( -- (赠送微信) -
- ) : ( - "" - )} -开通超粉,空间动态免费看 @@ -323,15 +291,27 @@ export default function Pay({ params }) {
+ {it.period == 0 + ? "永久" + : it.period == 1 + ? "月度" + : it.period == 2 + ? "季度" + : it.period == 3 + ? "半年" + : "年度"} + 超粉 +
++ ¥ + + {it.price / 100} + +
++ 赠送微信 +
+ ) : ( + "" + )} +购买须知:
diff --git a/public/images/superFan_price_bg.png b/public/images/superFan_price_bg.png new file mode 100644 index 0000000..cce99ba Binary files /dev/null and b/public/images/superFan_price_bg.png differ