Compare commits
14 Commits
Author | SHA1 | Date |
---|---|---|
yezian | 614aa92b6e | |
yezian | 8d172da89e | |
jueweijue | 2d641e73b1 | |
jueweijue | 0012a3ecc7 | |
jueweijue | 8b06448b95 | |
jueweijue | cdfe530d5d | |
jueweijue | acba98f9fa | |
jueweijue | 1cadb78de5 | |
jueweijue | 9de1f71e45 | |
jueweijue | 2da7bdb57b | |
jueweijue | 91dc29e341 | |
yezian | 0d8cda9787 | |
yezian | f007e0d025 | |
yezian | cc02c10a98 |
87
app/page.jsx
87
app/page.jsx
|
@ -11,6 +11,7 @@ import download_rightbottom from "@/public/images/download_rightbottom.png";
|
|||
import slogan from "@/public/images/slogan.png";
|
||||
import qrcode from "@/public/images/qrcode.png";
|
||||
import Footer from "@/components/Footer";
|
||||
import Link from "next/link";
|
||||
|
||||
export default function Home() {
|
||||
const [deviceType, setDeviceType] = useState("");
|
||||
|
@ -55,12 +56,39 @@ export default function Home() {
|
|||
alt=""
|
||||
/>
|
||||
</div>
|
||||
<div className="flex flex-col flex-1 py-16 items-center justify-around z-10">
|
||||
<div className="flex flex-col flex-1 py-8 items-center justify-around z-10">
|
||||
<Image className="w-96" src={slogan} priority alt="" />
|
||||
<div className="flex px-8 max-w-xl">
|
||||
<h1 className="text-white text-base leading-6">
|
||||
<svg
|
||||
className="inline-block mr-2"
|
||||
viewBox="0 0 1024 1024"
|
||||
width="16"
|
||||
height="16"
|
||||
>
|
||||
<path
|
||||
d="M989.696 506.88c-23.04-23.04-50.688-34.304-83.968-34.304H768c-16.384 0-30.208-5.632-41.984-17.408-11.776-11.776-17.408-25.6-17.408-41.984v-19.456c0-43.52 15.36-80.896 46.08-111.616s68.096-46.08 111.616-46.08h39.424c10.752 0 19.968-4.096 27.648-11.776 7.68-7.68 11.776-16.896 11.776-27.648V118.272c0-10.752-3.584-19.968-11.776-27.648-7.68-7.68-16.896-11.776-27.648-11.776h-39.424c-42.496 0-83.456 8.192-122.368 25.088-38.912 16.384-72.192 38.912-100.864 67.584-28.16 28.16-50.688 61.952-67.584 100.864-16.896 38.912-25.088 79.36-25.088 122.368v433.152c0 32.768 11.776 60.928 34.304 83.968 23.04 23.04 50.688 34.304 83.968 34.304h236.032c32.768 0 60.928-11.264 83.968-34.304 23.04-23.04 34.304-50.688 34.304-83.968v-236.544c1.024-33.28-10.24-61.44-33.28-84.48M438.272 506.88c-23.04-23.04-50.688-34.304-83.456-34.304h-138.24c-16.384 0-30.208-5.632-41.984-17.408-11.776-11.776-17.408-25.6-17.408-41.984v-19.456c0-43.52 15.36-80.896 46.08-111.616s68.096-46.08 111.616-46.08h39.424c10.752 0 19.968-4.096 27.648-11.776 7.68-7.68 11.776-16.896 11.776-27.648V118.272c0-10.752-4.096-19.968-11.776-27.648-7.68-7.68-16.896-11.776-27.648-11.776h-39.424c-42.496 0-83.456 8.192-122.368 25.088-38.912 16.384-72.192 38.912-100.864 67.584C63.488 199.68 40.96 233.472 24.064 272.384 8.192 310.272 0 351.232 0 393.728v433.152c0 32.768 11.264 60.928 34.304 83.968 23.04 23.04 50.688 34.304 83.968 34.304h236.544c32.768 0 60.928-11.264 83.456-34.304 23.04-23.04 34.304-50.688 34.304-83.968v-236.544c0-32.256-11.264-60.416-34.304-83.456"
|
||||
fill="#FF669E"
|
||||
></path>
|
||||
</svg>
|
||||
铁粉空间是一款专注于创作者与粉丝互动的内容分享平台。在这里,你可以查看你喜欢的创作者的全平台账号,并可以一键跳转进行关注。也能在这儿查看Ta的最新动态,做最了解Ta的那个铁粉。
|
||||
<svg
|
||||
className="inline-block ml-2"
|
||||
viewBox="0 0 1024 1024"
|
||||
width="16"
|
||||
height="16"
|
||||
>
|
||||
<path
|
||||
d="M34.304 517.12c23.04 23.04 50.688 34.304 83.968 34.304H256c16.384 0 30.208 5.632 41.984 17.408 11.776 11.776 17.408 25.6 17.408 41.984v19.456c0 43.52-15.36 80.896-46.08 111.616s-68.096 46.08-111.616 46.08h-39.424c-10.752 0-19.968 4.096-27.648 11.776-7.68 7.68-11.776 16.896-11.776 27.648V906.24c0 10.752 3.584 19.968 11.776 27.648 7.68 7.68 16.896 11.776 27.648 11.776h39.424c42.496 0 83.456-8.192 122.368-25.088 38.912-16.384 72.192-38.912 100.864-67.584 28.16-28.16 50.688-61.952 67.584-100.864 16.896-38.912 25.088-79.36 25.088-122.368V197.12c0-32.768-11.776-60.928-34.304-83.968-23.04-23.04-50.688-34.304-83.968-34.304H118.272c-32.768 0-60.928 11.264-83.968 34.304C11.264 136.192 0 163.84 0 197.12v236.544C0 465.92 11.264 494.08 34.304 517.12m551.424 0c23.04 23.04 50.688 34.304 83.456 34.304h137.728c16.384 0 30.208 5.632 41.984 17.408 11.776 11.776 17.408 25.6 17.408 41.984v19.456c0 43.52-15.36 80.896-46.08 111.616s-68.096 46.08-111.616 46.08h-39.424c-10.752 0-19.968 4.096-27.648 11.776-7.68 7.68-11.776 16.896-11.776 27.648V906.24c0 10.752 4.096 19.968 11.776 27.648 7.68 7.68 16.896 11.776 27.648 11.776h39.424c42.496 0 83.456-8.192 122.368-25.088 38.912-16.384 72.192-38.912 100.864-67.584 28.16-28.16 50.688-61.952 67.584-100.864 16.896-38.912 25.088-79.36 25.088-122.368V197.12c0-32.768-11.264-60.928-34.304-83.968-23.04-23.04-50.688-34.304-83.968-34.304h-236.544c-32.768 0-60.928 11.264-83.456 34.304-23.04 23.04-34.304 50.688-34.304 83.968v236.544c-0.512 32.256 10.752 60.416 33.792 83.456"
|
||||
fill="#FF669E"
|
||||
></path>
|
||||
</svg>
|
||||
</h1>
|
||||
</div>
|
||||
{deviceType === "pc" && (
|
||||
<div className="flex flex-row gap-20">
|
||||
<a
|
||||
href="https://filecdn01.tiefen.fun/appdownload/ironfans1.4.3.apk"
|
||||
href="https://filecdn01.tiefen.fun/appdownload/ironfans1.4.5.apk"
|
||||
className="group relative cursor-pointer w-20 h-20 rounded-full bg-[#FFFFFF1A]"
|
||||
>
|
||||
<p className="group-hover:opacity-100 opacity-0 transition-all duration-300 absolute flex w-full h-full items-center justify-center text-white text-xs">
|
||||
|
@ -102,20 +130,49 @@ export default function Home() {
|
|||
<p className="mt-3 text-white text-sm font-normal">手机扫码下载</p>
|
||||
)}
|
||||
</div>
|
||||
<div className="flex flex-col items-center">
|
||||
{deviceType !== "pc" && (
|
||||
<>
|
||||
<a
|
||||
className="btn bg-gradient-to-r from-[#FF668B] to-[#FF66F0] rounded-full text-white text-lg font-medium w-64 h-14"
|
||||
href={
|
||||
deviceType === "ios"
|
||||
? "https://apps.apple.com/app/%E9%93%81%E7%B2%89%E7%A9%BA%E9%97%B4/id6472775330"
|
||||
: "https://filecdn01.tiefen.fun/appdownload/ironfans1.4.3.apk"
|
||||
}
|
||||
<div className="flex flex-col items-center w-full bg-white">
|
||||
<a
|
||||
className="btn bg-gradient-to-r from-[#FF668B] to-[#FF66F0] rounded-full text-white text-lg font-medium w-64 h-14"
|
||||
href={
|
||||
deviceType === "ios"
|
||||
? "itms-services://?action=download-manifest&url=https://filecdn01.tiefen.fun/appdownload/ironfans.plist"
|
||||
: "https://filecdn01.tiefen.fun/appdownload/ironfans1.4.5.apk"
|
||||
}
|
||||
>
|
||||
安装1
|
||||
</a>
|
||||
<div
|
||||
className="btn bg-gradient-to-r from-[#FF668B] to-[#FF66F0] rounded-full text-white text-lg font-medium w-64 h-14"
|
||||
onClick={() => {
|
||||
const url =
|
||||
deviceType === "ios"
|
||||
? "itms-services://?action=download-manifest&url=https://filecdn01.tiefen.fun/appdownload/ironfans.plist"
|
||||
: "https://filecdn01.tiefen.fun/appdownload/ironfans1.4.5.apk";
|
||||
window.location.href = url;
|
||||
}}
|
||||
>
|
||||
安装2
|
||||
</div>
|
||||
<a
|
||||
className="bg-red-400 w-64 h-14"
|
||||
href={
|
||||
deviceType === "ios"
|
||||
? "itms-services://?action=download-manifest&url=https://filecdn01.tiefen.fun/appdownload/ironfans.plist"
|
||||
: "https://filecdn01.tiefen.fun/appdownload/ironfans1.4.5.apk"
|
||||
}
|
||||
>
|
||||
安装3
|
||||
</a>
|
||||
{deviceType !== "Android" && (
|
||||
<p className="mt-3 text-white text-sm font-normal">
|
||||
安装前请卸载旧版本,详情请
|
||||
<Link
|
||||
className="link text-primary cursor-pointer"
|
||||
href="/doc/ioshowtoinstall"
|
||||
>
|
||||
安装
|
||||
</a>
|
||||
</>
|
||||
查看帮助
|
||||
</Link>
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -98,6 +98,7 @@ export default function Pay() {
|
|||
product_id: customCoin.selected ? "h5_custom_coin" : selectedPrice.id,
|
||||
custom_coins: customCoin.selected ? customCoin.num : 0,
|
||||
pay_type: type,
|
||||
redirect_url: type === "yeepay_wxpay_h5" ? window.location.href : "",
|
||||
from: "app",
|
||||
};
|
||||
|
||||
|
@ -129,6 +130,12 @@ export default function Pay() {
|
|||
return;
|
||||
}
|
||||
switch (type) {
|
||||
case "yeepay_alipay_h5":
|
||||
router.push(`${data.data.yeepay_alipay_h5_param_str}`);
|
||||
break;
|
||||
case "yeepay_wxpay_h5":
|
||||
router.push(`${data.data.yeepay_wxpay_h5_param_str}`);
|
||||
break;
|
||||
case "alipay_h5":
|
||||
router.push(`${data.data.alipay_h5_param_str}`);
|
||||
break;
|
||||
|
@ -275,7 +282,7 @@ export default function Pay() {
|
|||
<div className="flex mt-auto mb-12">
|
||||
<div className="basis-1/2 px-2">
|
||||
<button
|
||||
onClick={() => createOrder("alipay_h5")}
|
||||
onClick={() => createOrder("yeepay_alipay_h5")}
|
||||
className="flex flex-row h-12 w-full items-center justify-center bg-primary rounded-full py-2"
|
||||
>
|
||||
<svg viewBox="0 0 1024 1024" width="18" height="18">
|
||||
|
@ -289,7 +296,7 @@ export default function Pay() {
|
|||
</div>
|
||||
<div className="basis-1/2 px-2">
|
||||
<button
|
||||
onClick={() => createOrder("wxpay_h5")}
|
||||
onClick={() => createOrder("yeepay_wxpay_h5")}
|
||||
className="flex flex-row h-12 w-full items-center justify-center bg-primary rounded-full py-2"
|
||||
>
|
||||
<svg viewBox="0 0 1228 1024" width="18" height="18">
|
||||
|
|
|
@ -34,11 +34,13 @@ export default function Vip() {
|
|||
|
||||
//检查用户是否是vip
|
||||
const [isVip, setIsVip] = useState(false);
|
||||
const [isIos, setIsIos] = useState(false);
|
||||
const [name, setName] = useState("");
|
||||
const [isFetching, setIsFetching] = useState(true);
|
||||
const getUserData = async () => {
|
||||
try {
|
||||
const base = webviewBaseRequest();
|
||||
if (base.b_dt === 1) setIsIos(true);
|
||||
const signature = generateSignature({
|
||||
...base,
|
||||
mid: base.b_mid,
|
||||
|
@ -98,6 +100,24 @@ export default function Vip() {
|
|||
return;
|
||||
}
|
||||
|
||||
if (type === "coin") {
|
||||
window.ReactNativeWebView.postMessage(
|
||||
JSON.stringify({
|
||||
type: "COINPAY",
|
||||
data: {
|
||||
url: "/api/vas/create_order",
|
||||
body: { product_id: "membership" },
|
||||
product: "会员资格",
|
||||
coinPrice: 100,
|
||||
validity: "永久",
|
||||
info: "",
|
||||
onPurchaseDone: () => {},
|
||||
},
|
||||
})
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
setIsLoading(true);
|
||||
|
||||
const signature = generateSignature(body);
|
||||
|
@ -120,6 +140,14 @@ export default function Vip() {
|
|||
return;
|
||||
}
|
||||
switch (type) {
|
||||
case "iap":
|
||||
window.ReactNativeWebView.postMessage(
|
||||
JSON.stringify({
|
||||
type: "IAP",
|
||||
data: "member_forever",
|
||||
})
|
||||
);
|
||||
break;
|
||||
case "alipay_h5":
|
||||
router.push(`${data.data.alipay_h5_param_str}`);
|
||||
break;
|
||||
|
@ -245,35 +273,51 @@ export default function Vip() {
|
|||
<div className="flex flex-col w-full fixed left-0 bottom-0 z-20">
|
||||
<div className="h-12 bg-gradient-to-t from-[#07050AE5] to-[#07050A00]"></div>
|
||||
<div className="flex flex-col pt-3 pb-11 px-4 bg-[#07050AE5]">
|
||||
<div className="flex flex-row justify-between">
|
||||
<div className="basis-1/2 px-2">
|
||||
<div
|
||||
onClick={() => createOrder("alipay_h5")}
|
||||
className="flex flex-row cursor-pointer gap-1.5 h-11 items-center justify-center bg-primary rounded-full"
|
||||
>
|
||||
<Image src={alipay} width={22} alt="" />
|
||||
<p className="text-white text-base font-medium whitespace-nowrap">
|
||||
支付宝支付
|
||||
</p>
|
||||
{!isIos && (
|
||||
<div className="flex flex-row justify-between">
|
||||
<div className="basis-1/2 px-2">
|
||||
<div
|
||||
onClick={() => createOrder("alipay_h5")}
|
||||
className="flex flex-row cursor-pointer gap-1.5 h-11 items-center justify-center bg-primary rounded-full"
|
||||
>
|
||||
<Image src={alipay} width={22} alt="" />
|
||||
<p className="text-white text-base font-medium whitespace-nowrap">
|
||||
支付宝支付
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div className="basis-1/2 px-2">
|
||||
<div
|
||||
onClick={() => createOrder("wxpay_h5")}
|
||||
className="flex flex-row cursor-pointer gap-1.5 h-11 items-center justify-center bg-primary rounded-full"
|
||||
>
|
||||
<svg viewBox="0 0 1228 1024" width="18" height="18">
|
||||
<path
|
||||
d="M530.8928 703.1296a41.472 41.472 0 0 1-35.7376-19.8144l-2.7136-5.5808L278.272 394.752a18.7392 18.7392 0 0 1-2.048-8.1408 19.968 19.968 0 0 1 20.48-19.3536c4.608 0 8.8576 1.4336 12.288 3.84l234.3936 139.9296a64.4096 64.4096 0 0 0 54.528 5.9392L1116.2624 204.8C1004.9536 80.896 821.76 0 614.4 0 275.0464 0 0 216.576 0 483.6352c0 145.7152 82.7392 276.8896 212.2752 365.5168a38.1952 38.1952 0 0 1 17.2032 31.488 44.4928 44.4928 0 0 1-2.1504 12.3904l-27.6992 97.4848c-1.3312 4.608-3.328 9.3696-3.328 14.1312 0 10.752 9.216 19.3536 20.48 19.3536 4.4032 0 8.0384-1.536 11.776-3.584l134.5536-73.3184c10.1376-5.5296 20.7872-8.96 32.6144-8.96 6.2976 0 12.288 0.9216 18.0736 2.5088 62.72 17.0496 130.4576 26.5728 200.5504 26.5728C953.7024 967.168 1228.8 750.592 1228.8 483.6352c0-80.9472-25.4464-157.1328-70.0416-224.1024l-604.9792 436.992-4.4544 2.4064a42.1376 42.1376 0 0 1-18.432 4.1984z"
|
||||
fill="#FFFFFF"
|
||||
></path>
|
||||
</svg>
|
||||
<p className="text-white text-base font-medium whitespace-nowrap">
|
||||
微信支付
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="basis-1/2 px-2">
|
||||
<div
|
||||
onClick={() => createOrder("wxpay_h5")}
|
||||
className="flex flex-row cursor-pointer gap-1.5 h-11 items-center justify-center bg-primary rounded-full"
|
||||
>
|
||||
<svg viewBox="0 0 1228 1024" width="18" height="18">
|
||||
<path
|
||||
d="M530.8928 703.1296a41.472 41.472 0 0 1-35.7376-19.8144l-2.7136-5.5808L278.272 394.752a18.7392 18.7392 0 0 1-2.048-8.1408 19.968 19.968 0 0 1 20.48-19.3536c4.608 0 8.8576 1.4336 12.288 3.84l234.3936 139.9296a64.4096 64.4096 0 0 0 54.528 5.9392L1116.2624 204.8C1004.9536 80.896 821.76 0 614.4 0 275.0464 0 0 216.576 0 483.6352c0 145.7152 82.7392 276.8896 212.2752 365.5168a38.1952 38.1952 0 0 1 17.2032 31.488 44.4928 44.4928 0 0 1-2.1504 12.3904l-27.6992 97.4848c-1.3312 4.608-3.328 9.3696-3.328 14.1312 0 10.752 9.216 19.3536 20.48 19.3536 4.4032 0 8.0384-1.536 11.776-3.584l134.5536-73.3184c10.1376-5.5296 20.7872-8.96 32.6144-8.96 6.2976 0 12.288 0.9216 18.0736 2.5088 62.72 17.0496 130.4576 26.5728 200.5504 26.5728C953.7024 967.168 1228.8 750.592 1228.8 483.6352c0-80.9472-25.4464-157.1328-70.0416-224.1024l-604.9792 436.992-4.4544 2.4064a42.1376 42.1376 0 0 1-18.432 4.1984z"
|
||||
fill="#FFFFFF"
|
||||
></path>
|
||||
</svg>
|
||||
<p className="text-white text-base font-medium whitespace-nowrap">
|
||||
微信支付
|
||||
</p>
|
||||
)}
|
||||
{isIos && (
|
||||
<div className="flex flex-row justify-between">
|
||||
<div className="w-full px-2">
|
||||
<div
|
||||
onClick={() => createOrder("coin")}
|
||||
className="flex flex-row cursor-pointer gap-1.5 h-11 items-center justify-center bg-primary rounded-full"
|
||||
>
|
||||
<p className="text-white text-base font-medium whitespace-nowrap">
|
||||
立即开通
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
<p className="text-secondary text-xs font-medium mt-4 text-center mb-1">
|
||||
确认购买即视为同意
|
||||
<Link
|
||||
|
|
Loading…
Reference in New Issue