Compare commits
13 Commits
Author | SHA1 | Date |
---|---|---|
|
0911faeefa | |
|
a2e99c58b2 | |
|
38d69b98c1 | |
|
14dc556d2b | |
|
dd4761a74a | |
|
4f97241268 | |
|
68747ac67e | |
|
17fed7a6c0 | |
|
6ce8e06e61 | |
|
9eba84edcc | |
|
2c58736b6f | |
|
d3c9841e89 | |
|
c0211b50d0 |
|
@ -0,0 +1,25 @@
|
|||
import React from "react";
|
||||
|
||||
export default function About() {
|
||||
return (
|
||||
<div className="flex flex-col items-center p-6 bg-[#07050A] text-white">
|
||||
<h1 className="text-3xl font-bold mb-6">关于我们</h1>
|
||||
<p className="text-lg mb-4">
|
||||
我们是承德望月网络科技有限公司,致力于为用户提供优质的内容分享平台。
|
||||
</p>
|
||||
<p className="text-lg mb-4">
|
||||
我们的目标是通过创新的技术和优质的服务,连接创作者与粉丝,促进互动与交流。
|
||||
</p>
|
||||
<p className="text-lg mb-4">
|
||||
我们相信,良好的社区氛围和用户体验是我们成功的关键。
|
||||
</p>
|
||||
<p className="text-lg">
|
||||
感谢您对我们的支持与信任,期待与您一起创造美好的未来!
|
||||
</p>
|
||||
<br />
|
||||
<p className="text-lg">
|
||||
任何意见反馈请发送邮件到:chengdewangyue@outlook.com
|
||||
</p>
|
||||
</div>
|
||||
);
|
||||
}
|
|
@ -0,0 +1,64 @@
|
|||
export default function ContentCleaningNotice() {
|
||||
return (
|
||||
<section>
|
||||
<p className="text-center font-bold text-3xl">
|
||||
关于开展"绿色净网"行动的通知
|
||||
</p>
|
||||
<br />
|
||||
<p>尊敬的用户:</p>
|
||||
<p>
|
||||
为了更好地提升平台内容的质量,净化网络环境,铁粉空间正式启动"绿色净网"行动。作为唯一正版软件,我们始终坚持以合法合规为根本,坚决抵制盗版软件的出现。希望大家不要迷信不明来源的盗版软件,选择我们,选择安全、可靠、正当的社交空间。
|
||||
</p>
|
||||
<br />
|
||||
<p>
|
||||
<strong>一、绿色净网行动的目标</strong>
|
||||
</p>
|
||||
<p>
|
||||
"绿色净网"行动的核心目标是构建一个文明、健康的网络环境。我们将持续加强平台内容管理,积极清理不良信息,确保平台上的每一条内容都符合国家法律法规,确保每一位用户都能享受一个清新、安全的网络空间。
|
||||
</p>
|
||||
<br />
|
||||
<p>
|
||||
<strong>二、净网行动的重点内容</strong>
|
||||
</p>
|
||||
<ol>
|
||||
<li>
|
||||
<p>
|
||||
<strong>加强内容审核</strong>
|
||||
:我们将加大内容审核力度,严防任何形式的非法、低俗、暴力和淫秽内容的传播。通过智能和人工审核相结合,确保平台上的内容健康有益,符合社会主流价值观。
|
||||
</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>
|
||||
<strong>加强用户行为管理</strong>
|
||||
:对于发布不当内容、扰乱社区秩序、侵犯他人权益的用户,平台将依规进行处罚,包括但不限于警告、禁言、封号等措施。我们鼓励每一位用户主动举报不良信息,一起维护良好的平台秩序。
|
||||
</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>
|
||||
<strong>倡导文明交流</strong>
|
||||
:我们鼓励用户发表积极向上、有意义、有益的内容,倡导理性讨论,尊重差异。每一位用户的言行都对社区环境产生影响,只有共同努力,我们才能让网络空间更加和谐美好。
|
||||
</p>
|
||||
</li>
|
||||
</ol>
|
||||
<br />
|
||||
<p>
|
||||
<strong>三、用户行为规范</strong>
|
||||
</p>
|
||||
<p>
|
||||
请广大用户在使用平台时,严格遵守平台社区准则,保持良好的言论与行为。平台将继续加大内容管理力度,任何传播不良信息、扰乱平台秩序的行为都将受到严厉处理。我们希望每一位用户都能以身作则,共同维护平台的绿色生态。
|
||||
</p>
|
||||
<p>
|
||||
<strong>四、守护绿色互联网,共同参与</strong>
|
||||
</p>
|
||||
<p>
|
||||
我们坚信,网络环境的清朗需要每一位用户的共同努力。选择正版平台,就是选择安全、健康和可靠。我们也将在后续不断优化审核机制和技术手段,确保平台的内容健康、纯净。
|
||||
</p>
|
||||
<p>
|
||||
让我们携手共建一个清新、文明的互联网空间,共同守护绿色净网行动的成果!
|
||||
</p>
|
||||
<br />
|
||||
<p className="text-end font-bold text-lg">铁粉空间运营团队</p>
|
||||
<p className="text-end font-bold text-lg">2025年1月</p>
|
||||
</section>
|
||||
);
|
||||
}
|
|
@ -7,6 +7,9 @@ export default function Doc({ params }) {
|
|||
const PlatformGuidelines = dynamic(() => import("./PlatformGuidelines"));
|
||||
const RechargeAgreement = dynamic(() => import("./RechargeAgreement"));
|
||||
const IosHowToInstall = dynamic(() => import("./IosHowToInstall"));
|
||||
const ContentCleaningNotice = dynamic(() =>
|
||||
import("./ContentCleaningNotice")
|
||||
);
|
||||
switch (params.title) {
|
||||
case "privatypolicy":
|
||||
return <PrivatyPolicy />;
|
||||
|
@ -20,6 +23,8 @@ export default function Doc({ params }) {
|
|||
return <RechargeAgreement />;
|
||||
case "ioshowtoinstall":
|
||||
return <IosHowToInstall />;
|
||||
case "contentcleaningnotice":
|
||||
return <ContentCleaningNotice />;
|
||||
default:
|
||||
return <p>空页面</p>;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,247 @@
|
|||
"use client";
|
||||
|
||||
import React, { useState, useEffect, useCallback } from "react";
|
||||
import { useRouter, useSearchParams } from "next/navigation";
|
||||
import webviewBaseRequest from "@/utils/webviewBaseRequest";
|
||||
import { Toast } from "antd-mobile";
|
||||
import { InfiniteScroll } from "antd-mobile";
|
||||
import { setCookie } from "cookies-next";
|
||||
import copy from "@/utils/copy";
|
||||
|
||||
export default function LanternFestival() {
|
||||
const router = useRouter();
|
||||
const searchParams = useSearchParams();
|
||||
|
||||
const getBase = useCallback(
|
||||
(webviewBase) => {
|
||||
let searchParamsObj = null;
|
||||
let currentBaseCode = searchParams.get("base");
|
||||
if (currentBaseCode) {
|
||||
let currentBase = JSON.parse(currentBaseCode);
|
||||
searchParamsObj = { ...currentBase };
|
||||
}
|
||||
return searchParamsObj || webviewBase;
|
||||
},
|
||||
[searchParams]
|
||||
);
|
||||
|
||||
const [data, setData] = useState([]);
|
||||
const [more, setMore] = useState(true);
|
||||
const [offset, setOffset] = useState(0);
|
||||
const [isFetching, setIsFetching] = useState(true);
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
|
||||
const getData = async () => {
|
||||
if (isLoading) return;
|
||||
setIsLoading(true);
|
||||
const webviewBase = webviewBaseRequest();
|
||||
let base = getBase(webviewBase);
|
||||
try {
|
||||
const response = await fetch(`/api/activity/zone_discount`, {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
body: JSON.stringify({
|
||||
...base,
|
||||
offset: offset,
|
||||
limit: 10,
|
||||
}),
|
||||
});
|
||||
const _data = await response.json();
|
||||
if (_data.ret === -1) {
|
||||
Toast.show({
|
||||
content: _data.msg,
|
||||
});
|
||||
return;
|
||||
}
|
||||
setOffset(_data.data.offset);
|
||||
if (_data.data.more === 0) setMore(false);
|
||||
setData((prev) => [...prev, ..._data.data.list]);
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
} finally {
|
||||
setIsFetching(false);
|
||||
setIsLoading(false);
|
||||
}
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
setTimeout(() => {
|
||||
getData();
|
||||
}, 500);
|
||||
}, []);
|
||||
|
||||
const InfiniteScrollContent = ({ hasMore }) => {
|
||||
return (
|
||||
<>
|
||||
{hasMore ? (
|
||||
<>
|
||||
<span className="text-[#FFFFFF80]">加载中...</span>
|
||||
</>
|
||||
) : (
|
||||
<span className="text-[#FFFFFF80]">--- 我是有底线的 ---</span>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
const Card = ({ item }) => {
|
||||
return (
|
||||
<div
|
||||
className="basis-1/2 px-1 aspect-[140/200] cursor-pointer"
|
||||
onClick={() => {
|
||||
//如果是app内的webview打开
|
||||
const userAgent = navigator.userAgent;
|
||||
if (/FromWebview/i.test(userAgent)) {
|
||||
window.ReactNativeWebView.postMessage(
|
||||
JSON.stringify({
|
||||
type: "NAVIGATE",
|
||||
data: {
|
||||
page: "SpaceIntroduce",
|
||||
params: { mid: item?.mid },
|
||||
},
|
||||
})
|
||||
);
|
||||
return;
|
||||
}
|
||||
//如果是h5的iframe打开
|
||||
const webviewBase = webviewBaseRequest();
|
||||
let base = getBase(webviewBase);
|
||||
if (base?.b_token !== undefined) {
|
||||
window.top.location.href = `https://app.tiefen.fun/space/person_space_introduce/${item?.mid}`;
|
||||
return;
|
||||
}
|
||||
//如果直接从浏览器打开
|
||||
copy(
|
||||
`【${item?.name}】『ID:${item?.user_id}』,复制此条消息,打开铁粉空间APP,查看详情https://tiefen.fun/zone/${item?.user_id}`
|
||||
);
|
||||
setCookie("inviter", item?.user_id);
|
||||
router.push("/");
|
||||
}}
|
||||
>
|
||||
<div className="relative w-full">
|
||||
<img
|
||||
className="absolute top-0 left-0 w-full z-10"
|
||||
src={
|
||||
process.env.NEXT_PUBLIC_CDN_URL +
|
||||
"/public/images/spring_festival_card_bg.png"
|
||||
}
|
||||
alt=""
|
||||
/>
|
||||
<img
|
||||
className="absolute top-0 left-0 w-full z-30"
|
||||
src={
|
||||
process.env.NEXT_PUBLIC_CDN_URL +
|
||||
"/public/images/spring_festival_card_top.png"
|
||||
}
|
||||
alt=""
|
||||
/>
|
||||
<div className="absolute top-0 left-0 w-full z-20 p-[4.2%]">
|
||||
<div className="relative">
|
||||
<img
|
||||
className="w-full aspect-square object-cover"
|
||||
src={item?.avatar?.images[0]?.urls[0]}
|
||||
alt=""
|
||||
/>
|
||||
<div className="absolute left-0 bottom-0 z-10 flex items-center justify-center w-full h-8 bg-gradient-to-r from-[#FF4A8FEB] to-[#FF8E3EEB]">
|
||||
<p className="text-white text-sm">{item?.name}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex flex-row justify-around items-center mt-1">
|
||||
<p className="text-xs text-[#68122280]">
|
||||
空间原价{" "}
|
||||
<span className="line-through">
|
||||
¥{item?.original_price / 100}
|
||||
</span>
|
||||
</p>
|
||||
<p className="text-2xl text-[#D71035] font-semibold">
|
||||
<span className="text-sm">¥</span>
|
||||
{item?.price / 100}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
if (isFetching) {
|
||||
return (
|
||||
<section className="flex flex-1 justify-center container">
|
||||
<span className="absolute top-1/2 loading loading-spinner loading-lg"></span>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
|
||||
// 获取当前时间
|
||||
const currentDate = new Date();
|
||||
// 设置活动结束日期:2025年2月18日
|
||||
const targetDate = new Date("2025-02-18T00:00:00");
|
||||
|
||||
// 判断当前时间是否在活动结束时间之后
|
||||
if (currentDate >= targetDate) {
|
||||
return (
|
||||
<section className="flex flex-col flex-1 bg-[#EE354F]">
|
||||
<img
|
||||
className="absolute top-0 left-0 z-0 w-full"
|
||||
src={
|
||||
process.env.NEXT_PUBLIC_CDN_URL +
|
||||
"/public/images/lantern_festival_bg.png"
|
||||
}
|
||||
alt=""
|
||||
/>
|
||||
<img
|
||||
className="absolute top-[72px] left-0 z-10 w-full"
|
||||
src={
|
||||
process.env.NEXT_PUBLIC_CDN_URL +
|
||||
"/public/images/lantern_festival_title.png"
|
||||
}
|
||||
alt=""
|
||||
/>
|
||||
<div className="w-full aspect-[308/252]"></div>
|
||||
<p className="text-center text-2xl font-bold text-white z-40">
|
||||
活动已结束
|
||||
</p>
|
||||
<div
|
||||
className="mx-auto mt-4 btn border-[#fcedbb] border-2 bg-gradient-to-b from-[#f2a98d] to-[#ed6c40] rounded-full text-white text-lg font-medium w-64 h-14"
|
||||
onClick={() => {
|
||||
router.push("/");
|
||||
}}
|
||||
>
|
||||
下载APP
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<section className="flex flex-col flex-1 bg-[#EE354F]">
|
||||
<img
|
||||
className="absolute top-0 left-0 z-0 w-full"
|
||||
src={
|
||||
process.env.NEXT_PUBLIC_CDN_URL +
|
||||
"/public/images/lantern_festival_bg.png"
|
||||
}
|
||||
alt=""
|
||||
/>
|
||||
<img
|
||||
className="absolute top-[72px] left-0 z-10 w-full"
|
||||
src={
|
||||
process.env.NEXT_PUBLIC_CDN_URL +
|
||||
"/public/images/lantern_festival_title.png"
|
||||
}
|
||||
alt=""
|
||||
/>
|
||||
<div className="w-full aspect-[308/252]"></div>
|
||||
<div className="flex flex-1 flex-row flex-wrap px-3 z-10 w-full">
|
||||
{data?.map((item, index) => (
|
||||
<Card key={index} item={item} />
|
||||
))}
|
||||
</div>
|
||||
<InfiniteScroll loadMore={() => getData()} hasMore={more}>
|
||||
<InfiniteScrollContent hasMore={more} />
|
||||
</InfiniteScroll>
|
||||
</section>
|
||||
);
|
||||
}
|
|
@ -0,0 +1,247 @@
|
|||
"use client";
|
||||
|
||||
import React, { useState, useEffect, useCallback } from "react";
|
||||
import { useRouter, useSearchParams } from "next/navigation";
|
||||
import webviewBaseRequest from "@/utils/webviewBaseRequest";
|
||||
import { Toast } from "antd-mobile";
|
||||
import { InfiniteScroll } from "antd-mobile";
|
||||
import { setCookie } from "cookies-next";
|
||||
import copy from "@/utils/copy";
|
||||
|
||||
export default function SpringFestival() {
|
||||
const router = useRouter();
|
||||
const searchParams = useSearchParams();
|
||||
|
||||
const getBase = useCallback(
|
||||
(webviewBase) => {
|
||||
let searchParamsObj = null;
|
||||
let currentBaseCode = searchParams.get("base");
|
||||
if (currentBaseCode) {
|
||||
let currentBase = JSON.parse(currentBaseCode);
|
||||
searchParamsObj = { ...currentBase };
|
||||
}
|
||||
return searchParamsObj || webviewBase;
|
||||
},
|
||||
[searchParams]
|
||||
);
|
||||
|
||||
const [data, setData] = useState([]);
|
||||
const [more, setMore] = useState(true);
|
||||
const [offset, setOffset] = useState(0);
|
||||
const [isFetching, setIsFetching] = useState(true);
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
|
||||
const getData = async () => {
|
||||
if (isLoading) return;
|
||||
setIsLoading(true);
|
||||
const webviewBase = webviewBaseRequest();
|
||||
let base = getBase(webviewBase);
|
||||
try {
|
||||
const response = await fetch(`/api/activity/zone_discount`, {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
body: JSON.stringify({
|
||||
...base,
|
||||
offset: offset,
|
||||
limit: 10,
|
||||
}),
|
||||
});
|
||||
const _data = await response.json();
|
||||
if (_data.ret === -1) {
|
||||
Toast.show({
|
||||
content: _data.msg,
|
||||
});
|
||||
return;
|
||||
}
|
||||
setOffset(_data.data.offset);
|
||||
if (_data.data.more === 0) setMore(false);
|
||||
setData((prev) => [...prev, ..._data.data.list]);
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
} finally {
|
||||
setIsFetching(false);
|
||||
setIsLoading(false);
|
||||
}
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
setTimeout(() => {
|
||||
getData();
|
||||
}, 500);
|
||||
}, []);
|
||||
|
||||
const InfiniteScrollContent = ({ hasMore }) => {
|
||||
return (
|
||||
<>
|
||||
{hasMore ? (
|
||||
<>
|
||||
<span className="text-[#FFFFFF80]">加载中...</span>
|
||||
</>
|
||||
) : (
|
||||
<span className="text-[#FFFFFF80]">--- 我是有底线的 ---</span>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
const Card = ({ item }) => {
|
||||
return (
|
||||
<div
|
||||
className="basis-1/2 px-1 aspect-[140/200] cursor-pointer"
|
||||
onClick={() => {
|
||||
//如果是app内的webview打开
|
||||
const userAgent = navigator.userAgent;
|
||||
if (/FromWebview/i.test(userAgent)) {
|
||||
window.ReactNativeWebView.postMessage(
|
||||
JSON.stringify({
|
||||
type: "NAVIGATE",
|
||||
data: {
|
||||
page: "SpaceIntroduce",
|
||||
params: { mid: item?.mid },
|
||||
},
|
||||
})
|
||||
);
|
||||
return;
|
||||
}
|
||||
//如果是h5的iframe打开
|
||||
const webviewBase = webviewBaseRequest();
|
||||
let base = getBase(webviewBase);
|
||||
if (base?.b_token !== undefined) {
|
||||
window.top.location.href = `https://app.tiefen.fun/space/person_space_introduce/${item?.mid}`;
|
||||
return;
|
||||
}
|
||||
//如果直接从浏览器打开
|
||||
copy(
|
||||
`【${item?.name}】『ID:${item?.user_id}』,复制此条消息,打开铁粉空间APP,查看详情https://tiefen.fun/zone/${item?.user_id}`
|
||||
);
|
||||
setCookie("inviter", item?.user_id);
|
||||
router.push("/");
|
||||
}}
|
||||
>
|
||||
<div className="relative w-full">
|
||||
<img
|
||||
className="absolute top-0 left-0 w-full z-10"
|
||||
src={
|
||||
process.env.NEXT_PUBLIC_CDN_URL +
|
||||
"/public/images/spring_festival_card_bg.png"
|
||||
}
|
||||
alt=""
|
||||
/>
|
||||
<img
|
||||
className="absolute top-0 left-0 w-full z-30"
|
||||
src={
|
||||
process.env.NEXT_PUBLIC_CDN_URL +
|
||||
"/public/images/spring_festival_card_top.png"
|
||||
}
|
||||
alt=""
|
||||
/>
|
||||
<div className="absolute top-0 left-0 w-full z-20 p-[4.2%]">
|
||||
<div className="relative">
|
||||
<img
|
||||
className="w-full aspect-square object-cover"
|
||||
src={item?.avatar?.images[0]?.urls[0]}
|
||||
alt=""
|
||||
/>
|
||||
<div className="absolute left-0 bottom-0 z-10 flex items-center justify-center w-full h-8 bg-gradient-to-r from-[#FF4A8FEB] to-[#FF8E3EEB]">
|
||||
<p className="text-white text-sm">{item?.name}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex flex-row justify-around items-center mt-1">
|
||||
<p className="text-xs text-[#68122280]">
|
||||
空间原价{" "}
|
||||
<span className="line-through">
|
||||
¥{item?.original_price / 100}
|
||||
</span>
|
||||
</p>
|
||||
<p className="text-2xl text-[#D71035] font-semibold">
|
||||
<span className="text-sm">¥</span>
|
||||
{item?.price / 100}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
if (isFetching) {
|
||||
return (
|
||||
<section className="flex flex-1 justify-center container">
|
||||
<span className="absolute top-1/2 loading loading-spinner loading-lg"></span>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
|
||||
// 获取当前时间
|
||||
const currentDate = new Date();
|
||||
// 设置活动结束日期:2025年2月5日
|
||||
const targetDate = new Date("2025-02-05T00:00:00");
|
||||
|
||||
// 判断当前时间是否在活动结束时间之后
|
||||
if (currentDate >= targetDate) {
|
||||
return (
|
||||
<section className="flex flex-col flex-1 bg-[#EE354F]">
|
||||
<img
|
||||
className="absolute top-0 left-0 z-0 w-full"
|
||||
src={
|
||||
process.env.NEXT_PUBLIC_CDN_URL +
|
||||
"/public/images/spring_festival_bg.png"
|
||||
}
|
||||
alt=""
|
||||
/>
|
||||
<img
|
||||
className="absolute top-[72px] left-0 z-10 w-full"
|
||||
src={
|
||||
process.env.NEXT_PUBLIC_CDN_URL +
|
||||
"/public/images/spring_festival_title.png"
|
||||
}
|
||||
alt=""
|
||||
/>
|
||||
<div className="w-full aspect-[308/252]"></div>
|
||||
<p className="text-center text-2xl font-bold text-white z-40">
|
||||
活动已结束
|
||||
</p>
|
||||
<div
|
||||
className="mx-auto mt-4 btn border-[#fcedbb] border-2 bg-gradient-to-b from-[#f2a98d] to-[#ed6c40] rounded-full text-white text-lg font-medium w-64 h-14"
|
||||
onClick={() => {
|
||||
router.push("/");
|
||||
}}
|
||||
>
|
||||
下载APP
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<section className="flex flex-col flex-1 bg-[#EE354F]">
|
||||
<img
|
||||
className="absolute top-0 left-0 z-0 w-full"
|
||||
src={
|
||||
process.env.NEXT_PUBLIC_CDN_URL +
|
||||
"/public/images/spring_festival_bg.png"
|
||||
}
|
||||
alt=""
|
||||
/>
|
||||
<img
|
||||
className="absolute top-[72px] left-0 z-10 w-full"
|
||||
src={
|
||||
process.env.NEXT_PUBLIC_CDN_URL +
|
||||
"/public/images/spring_festival_title.png"
|
||||
}
|
||||
alt=""
|
||||
/>
|
||||
<div className="w-full aspect-[308/252]"></div>
|
||||
<div className="flex flex-1 flex-row flex-wrap px-3 z-10 w-full">
|
||||
{data?.map((item, index) => (
|
||||
<Card key={index} item={item} />
|
||||
))}
|
||||
</div>
|
||||
<InfiniteScroll loadMore={() => getData()} hasMore={more}>
|
||||
<InfiniteScrollContent hasMore={more} />
|
||||
</InfiniteScroll>
|
||||
</section>
|
||||
);
|
||||
}
|
178
app/pay/page.jsx
|
@ -29,6 +29,9 @@ export default function Pay() {
|
|||
//选择任意金额充值
|
||||
const [customCoin, setCustomCoin] = useState({ selected: false, num: 1000 });
|
||||
|
||||
//备用支付渠道是否展示
|
||||
const [isBackupPaymentVisible, setIsBackupPaymentVisible] = useState(false);
|
||||
|
||||
//任意金额充值的金币数量
|
||||
const handleChangeCustomCoin = (e) => {
|
||||
let newValue = parseInt(e.target.value, 10);
|
||||
|
@ -42,6 +45,11 @@ export default function Pay() {
|
|||
}
|
||||
};
|
||||
|
||||
//备用支付渠道是否展示
|
||||
const handleBackupPaymentVisible = () => {
|
||||
setIsBackupPaymentVisible(true);
|
||||
};
|
||||
|
||||
//获取当前充值档位
|
||||
const [isFetching, setIsFetching] = useState(true);
|
||||
const getBase = useCallback(
|
||||
|
@ -112,7 +120,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 : "",
|
||||
redirect_url: type === "wxpay_h5" ? "https://yibowanhe.top/success" : "",
|
||||
from: searchParams.get("base") ? "web" : "app",
|
||||
};
|
||||
|
||||
|
@ -154,11 +162,121 @@ export default function Pay() {
|
|||
router.push(`${data.data.alipay_h5_param_str}`);
|
||||
break;
|
||||
case "wxpay_h5":
|
||||
router.push(
|
||||
`https://shop.tiefen.fun/pay/wxpay_h5/${encodeURIComponent(
|
||||
if (base.b_ch === "h5" && !base.b_model) {
|
||||
// 使用postMessage向父页面发送跳转请求
|
||||
const redirectUrl = `https://yibowanhe.top?url=${encodeURIComponent(
|
||||
data.data.wxpay_h5_param_str
|
||||
)}`
|
||||
);
|
||||
)}`;
|
||||
window.parent.postMessage(
|
||||
{
|
||||
type: "navigation",
|
||||
url: redirectUrl,
|
||||
},
|
||||
"*"
|
||||
); // 生产环境中应替换为父页面的确切域名
|
||||
} else {
|
||||
router.push(
|
||||
`https://yibowanhe.top?url=${encodeURIComponent(
|
||||
data.data.wxpay_h5_param_str
|
||||
)}`
|
||||
);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
router.push(`${data.data.alipay_h5_param_str}`);
|
||||
break;
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
} finally {
|
||||
setIsLoading(false);
|
||||
}
|
||||
};
|
||||
|
||||
//创建备用充值订单
|
||||
const createBackupPaymentOrder = async (type = "alipay_h5") => {
|
||||
if (!selectedPrice.id && !customCoin.selected) {
|
||||
Toast.show({
|
||||
content: "请选择充值档位",
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (customCoin.selected && customCoin.num < 10) {
|
||||
Toast.show({
|
||||
content: "最低充值1元哦~",
|
||||
});
|
||||
return;
|
||||
}
|
||||
const webviewBase = webviewBaseRequest();
|
||||
const base = getBase(webviewBase);
|
||||
|
||||
const body = {
|
||||
...base,
|
||||
product_id: customCoin.selected ? "h5_custom_coin" : selectedPrice.id,
|
||||
custom_coins: customCoin.selected ? customCoin.num : 0,
|
||||
pay_type: type,
|
||||
redirect_url: type === "wxpay_h5" ? "https://yibowanhe.top/success" : "",
|
||||
from: searchParams.get("base") ? "web" : "app",
|
||||
ver: "aliv2",
|
||||
};
|
||||
|
||||
//如果是微信jsapi支付直接跳转到中间页
|
||||
if (type === "wxpay_jsapi") {
|
||||
router.push(`/pay/${encodeURIComponent(JSON.stringify(body))}`);
|
||||
return;
|
||||
}
|
||||
|
||||
setIsLoading(true);
|
||||
|
||||
const signature = generateSignature(body);
|
||||
try {
|
||||
const response = await fetch(
|
||||
`/api/vas/create_order?signature=${signature}`,
|
||||
{
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
body: JSON.stringify(body),
|
||||
}
|
||||
);
|
||||
const data = await response.json();
|
||||
if (data.ret === -1) {
|
||||
Toast.show({
|
||||
content: data.msg,
|
||||
});
|
||||
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;
|
||||
case "wxpay_h5":
|
||||
if (base.b_ch === "h5" && !base.b_model) {
|
||||
// 使用postMessage向父页面发送跳转请求
|
||||
const redirectUrl = `https://yibowanhe.top?url=${encodeURIComponent(
|
||||
data.data.wxpay_h5_param_str
|
||||
)}`;
|
||||
window.parent.postMessage(
|
||||
{
|
||||
type: "navigation",
|
||||
url: redirectUrl,
|
||||
},
|
||||
"*"
|
||||
); // 生产环境中应替换为父页面的确切域名
|
||||
} else {
|
||||
router.push(
|
||||
`https://yibowanhe.top?url=${encodeURIComponent(
|
||||
data.data.wxpay_h5_param_str
|
||||
)}`
|
||||
);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
router.push(`${data.data.alipay_h5_param_str}`);
|
||||
|
@ -296,7 +414,7 @@ export default function Pay() {
|
|||
<div className="flex flex-col w-full mt-auto z-20">
|
||||
<div className="flex flex-col pt-3 pb-11 px-4 bg-[#07050AE5]">
|
||||
<div className="flex flex-row justify-between">
|
||||
<div className="w-full px-2">
|
||||
<div className="basis-1/2 pr-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"
|
||||
|
@ -314,8 +432,54 @@ export default function Pay() {
|
|||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div className="basis-1/2 pl-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>
|
||||
<p className="text-secondary text-xs font-medium mt-4 text-center mb-1">
|
||||
{isBackupPaymentVisible ? (
|
||||
<div className="px-2 mt-4">
|
||||
<div
|
||||
onClick={() => createBackupPaymentOrder("alipay_h5")}
|
||||
className="flex flex-row cursor-pointer gap-1.5 h-11 items-center justify-center bg-primary rounded-full"
|
||||
>
|
||||
<img
|
||||
className="w-[22px]"
|
||||
src={
|
||||
process.env.NEXT_PUBLIC_CDN_URL +
|
||||
"/public/images/alipay.png"
|
||||
}
|
||||
alt=""
|
||||
/>
|
||||
<p className="text-white text-base font-medium whitespace-nowrap">
|
||||
【备用】支付宝支付
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
) : (
|
||||
<p className="text-secondary text-xs font-medium mt-4 text-center mb-1">
|
||||
若无法支付,请尝试
|
||||
<span
|
||||
className="link text-[#309EDC]"
|
||||
onClick={handleBackupPaymentVisible}
|
||||
>
|
||||
备用支付渠道
|
||||
</span>
|
||||
</p>
|
||||
)}
|
||||
<p className="text-secondary text-xs font-medium mt-2 text-center mb-1">
|
||||
确认购买即视为同意
|
||||
<Link
|
||||
className="link text-[#309EDC]"
|
||||
|
|
167
app/vip/page.jsx
|
@ -6,6 +6,7 @@ import webviewBaseRequest from "@/utils/webviewBaseRequest";
|
|||
import Link from "next/link";
|
||||
import { Toast } from "antd-mobile";
|
||||
import { useRouter, useSearchParams } from "next/navigation";
|
||||
|
||||
export default function Vip() {
|
||||
const router = useRouter();
|
||||
const searchParams = useSearchParams();
|
||||
|
@ -15,6 +16,14 @@ export default function Vip() {
|
|||
const [name, setName] = useState("");
|
||||
const [isFetching, setIsFetching] = useState(true);
|
||||
|
||||
//备用支付渠道是否展示
|
||||
const [isBackupPaymentVisible, setIsBackupPaymentVisible] = useState(false);
|
||||
|
||||
//备用支付渠道是否展示
|
||||
const handleBackupPaymentVisible = () => {
|
||||
setIsBackupPaymentVisible(true);
|
||||
};
|
||||
|
||||
const getBase = useCallback(
|
||||
(webviewBase) => {
|
||||
let searchParamsObj = null;
|
||||
|
@ -82,7 +91,7 @@ export default function Vip() {
|
|||
...base,
|
||||
product_id: "membership",
|
||||
pay_type: type,
|
||||
redirect_url: type === "yeepay_wxpay_h5" ? window.location.href : "",
|
||||
redirect_url: type === "wxpay_h5" ? "https://yibowanhe.top/success" : "",
|
||||
from: searchParams.get("base") ? "web" : "app",
|
||||
};
|
||||
|
||||
|
@ -124,11 +133,107 @@ export default function Vip() {
|
|||
router.push(`${data.data.alipay_h5_param_str}`);
|
||||
break;
|
||||
case "wxpay_h5":
|
||||
router.push(
|
||||
`https://shop.tiefen.fun/pay/wxpay_h5/${encodeURIComponent(
|
||||
if (base.b_ch === "h5" && !base.b_model) {
|
||||
// 使用postMessage向父页面发送跳转请求
|
||||
const redirectUrl = `https://yibowanhe.top?url=${encodeURIComponent(
|
||||
data.data.wxpay_h5_param_str
|
||||
)}`
|
||||
);
|
||||
)}`;
|
||||
window.parent.postMessage(
|
||||
{
|
||||
type: "navigation",
|
||||
url: redirectUrl,
|
||||
},
|
||||
"*"
|
||||
); // 生产环境中应替换为父页面的确切域名
|
||||
} else {
|
||||
router.push(
|
||||
`https://yibowanhe.top?url=${encodeURIComponent(
|
||||
data.data.wxpay_h5_param_str
|
||||
)}`
|
||||
);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
router.push(`${data.data.alipay_h5_param_str}`);
|
||||
break;
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
} finally {
|
||||
setIsLoading(false);
|
||||
}
|
||||
};
|
||||
|
||||
//创建备用充值订单
|
||||
const createBackupPaymentOrder = async (type = "alipay_h5") => {
|
||||
const webviewBase = webviewBaseRequest();
|
||||
let base = getBase(webviewBase);
|
||||
const body = {
|
||||
...base,
|
||||
product_id: "membership",
|
||||
pay_type: type,
|
||||
redirect_url: type === "wxpay_h5" ? "https://yibowanhe.top/success" : "",
|
||||
from: searchParams.get("base") ? "web" : "app",
|
||||
ver: "aliv2",
|
||||
};
|
||||
|
||||
//如果是微信jsapi支付直接跳转到中间页
|
||||
if (type === "wxpay_jsapi") {
|
||||
router.push(`/pay/${encodeURIComponent(JSON.stringify(body))}`);
|
||||
return;
|
||||
}
|
||||
|
||||
setIsLoading(true);
|
||||
|
||||
const signature = generateSignature(body);
|
||||
try {
|
||||
const response = await fetch(
|
||||
`/api/vas/create_order?signature=${signature}`,
|
||||
{
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
body: JSON.stringify(body),
|
||||
}
|
||||
);
|
||||
const data = await response.json();
|
||||
if (data.ret === -1) {
|
||||
Toast.show({
|
||||
content: data.msg,
|
||||
});
|
||||
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;
|
||||
case "wxpay_h5":
|
||||
if (base.b_ch === "h5" && !base.b_model) {
|
||||
// 使用postMessage向父页面发送跳转请求
|
||||
const redirectUrl = `https://yibowanhe.top?url=${encodeURIComponent(
|
||||
data.data.wxpay_h5_param_str
|
||||
)}`;
|
||||
window.parent.postMessage(
|
||||
{
|
||||
type: "navigation",
|
||||
url: redirectUrl,
|
||||
},
|
||||
"*"
|
||||
); // 生产环境中应替换为父页面的确切域名
|
||||
} else {
|
||||
router.push(
|
||||
`https://yibowanhe.top?url=${encodeURIComponent(
|
||||
data.data.wxpay_h5_param_str
|
||||
)}`
|
||||
);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
router.push(`${data.data.alipay_h5_param_str}`);
|
||||
|
@ -167,7 +272,7 @@ export default function Vip() {
|
|||
src={process.env.NEXT_PUBLIC_CDN_URL + "/public/images/viptitle.png"}
|
||||
alt=""
|
||||
/>
|
||||
<div className="flex flex-col px-4 pb-32">
|
||||
<div className="flex flex-col px-4 pb-48">
|
||||
{isVip ? (
|
||||
<div className="relative">
|
||||
<img
|
||||
|
@ -290,7 +395,7 @@ export default function Vip() {
|
|||
<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="w-full px-2">
|
||||
<div className="basis-1/2 pr-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"
|
||||
|
@ -308,8 +413,54 @@ export default function Vip() {
|
|||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div className="basis-1/2 pl-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>
|
||||
<p className="text-secondary text-xs font-medium mt-4 text-center mb-1">
|
||||
{isBackupPaymentVisible ? (
|
||||
<div className="px-2 mt-4">
|
||||
<div
|
||||
onClick={() => createBackupPaymentOrder("alipay_h5")}
|
||||
className="flex flex-row cursor-pointer gap-1.5 h-11 items-center justify-center bg-primary rounded-full"
|
||||
>
|
||||
<img
|
||||
className="w-[22px]"
|
||||
src={
|
||||
process.env.NEXT_PUBLIC_CDN_URL +
|
||||
"/public/images/alipay.png"
|
||||
}
|
||||
alt=""
|
||||
/>
|
||||
<p className="text-white text-base font-medium whitespace-nowrap">
|
||||
【备用】支付宝支付
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
) : (
|
||||
<p className="text-secondary text-xs font-medium mt-4 text-center mb-1">
|
||||
若无法支付,请尝试
|
||||
<span
|
||||
className="link text-[#309EDC]"
|
||||
onClick={handleBackupPaymentVisible}
|
||||
>
|
||||
备用支付渠道
|
||||
</span>
|
||||
</p>
|
||||
)}
|
||||
<p className="text-secondary text-xs font-medium mt-2 text-center mb-1">
|
||||
确认购买即视为同意
|
||||
<Link
|
||||
className="link text-[#309EDC]"
|
||||
|
|
|
@ -157,15 +157,24 @@ export default function WithDrawal() {
|
|||
...base,
|
||||
});
|
||||
try {
|
||||
await fetch(`/api/vas/withdraw_send_verifycode?signature=${signature}`, {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
body: JSON.stringify({
|
||||
...base,
|
||||
}),
|
||||
});
|
||||
const res = await fetch(
|
||||
`/api/vas/withdraw_send_verifycode?signature=${signature}`,
|
||||
{
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
body: JSON.stringify({
|
||||
...base,
|
||||
}),
|
||||
}
|
||||
);
|
||||
const _data = await res.json();
|
||||
if (_data.ret === -1) {
|
||||
Toast.show({
|
||||
content: _data.msg,
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
|
@ -394,7 +403,10 @@ export default function WithDrawal() {
|
|||
3.单笔最低提现金额为100元(即1000钻石),若提现金额大于20000元(即200000钻石)请联系客服;
|
||||
</p>
|
||||
<p className="text-error text-sm">
|
||||
4.自助提现渠道每日只能提现一次,若有更多提现需求,请联系客服。
|
||||
4.提现窗口期为每日8点至22点,请在此时间段进行提现操作;
|
||||
</p>
|
||||
<p className="text-error text-sm">
|
||||
5.自助提现渠道每日只能提现一次,若有更多提现需求,请联系客服。
|
||||
</p>
|
||||
<dialog id="comfirm_modal" className="modal">
|
||||
<div className="modal-box bg-[#17161A]">
|
||||
|
|
|
@ -16,6 +16,12 @@ export default function Footer() {
|
|||
<span className="text-xs text-secondary">
|
||||
|
|
||||
</span>
|
||||
<a href="/about" className="text-xs text-secondary">
|
||||
关于我们
|
||||
</a>
|
||||
<span className="text-xs text-secondary">
|
||||
|
|
||||
</span>
|
||||
{/* <a
|
||||
target="_blank"
|
||||
href="https://beian.mps.gov.cn/#/query/webSearch?code=51015602000741"
|
||||
|
@ -28,7 +34,7 @@ export default function Footer() {
|
|||
|
|
||||
</span> */}
|
||||
<a className="text-xs text-secondary">
|
||||
Copyright © 2023-2024 承德望月网络科技有限公司
|
||||
Copyright © 2023-2025 承德望月网络科技有限公司
|
||||
</a>
|
||||
</div>
|
||||
</footer>
|
||||
|
|
After Width: | Height: | Size: 167 KiB |
After Width: | Height: | Size: 45 KiB |
After Width: | Height: | Size: 173 KiB |
After Width: | Height: | Size: 7.5 KiB |
After Width: | Height: | Size: 9.5 KiB |
After Width: | Height: | Size: 41 KiB |
After Width: | Height: | Size: 36 KiB |