init
This commit is contained in:
parent
f45f0a8335
commit
a8cea668b1
|
@ -14,6 +14,8 @@ import zone from "@/public/images/zone.png";
|
|||
import Link from "next/link";
|
||||
import { setCookie } from "cookies-next";
|
||||
import copy from "@/utils/copy";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { checkAuth } from "@/utils/auth";
|
||||
|
||||
export default function StreamerDetail({ params }) {
|
||||
//页面数据
|
||||
|
@ -55,12 +57,21 @@ export default function StreamerDetail({ params }) {
|
|||
getData();
|
||||
}, []);
|
||||
|
||||
//将主播链接复制到剪贴板,并存cookie
|
||||
const copyAndSetCookieInviter = () => {
|
||||
setCookie("inviter", data?.user_id);
|
||||
copy(
|
||||
`【${data?.name}】『ID:${data?.user_id}』,复制此条消息,打开铁粉空间APP,查看详情https://tiefen.fun/${data?.user_id}`
|
||||
);
|
||||
const router = useRouter();
|
||||
|
||||
const [name, setName] = useState("");
|
||||
const [content, setContent] = useState("");
|
||||
|
||||
const handleSubmit = async (e) => {
|
||||
e.preventDefault();
|
||||
const isLogined = await checkAuth();
|
||||
if (!isLogined) {
|
||||
Toast.show({
|
||||
content: "请先登录",
|
||||
});
|
||||
return;
|
||||
}
|
||||
router.push("/pay");
|
||||
};
|
||||
|
||||
return (
|
||||
|
@ -69,7 +80,7 @@ export default function StreamerDetail({ params }) {
|
|||
<div className="absolute top-0 left-0 w-full">
|
||||
<div className="flex relative h-64 overflow-hidden">
|
||||
<img
|
||||
src={data?.cover?.images[0].urls[0]}
|
||||
src={data?.avatar?.images[0].urls[0]}
|
||||
alt=""
|
||||
className="w-full object-cover opacity-30"
|
||||
/>
|
||||
|
@ -77,7 +88,7 @@ export default function StreamerDetail({ params }) {
|
|||
</div>
|
||||
</div>
|
||||
<div className="flex flex-col flex-1 px-4 pt-2 pb-24 z-10">
|
||||
<AuthBar onNotLoginedClick={copyAndSetCookieInviter} />
|
||||
<AuthBar />
|
||||
<div className="flex flex-col items-center mt-24 mb-4">
|
||||
<div className="w-[74px] h-[74px] rounded-full overflow-hidden">
|
||||
<img
|
||||
|
@ -90,56 +101,34 @@ export default function StreamerDetail({ params }) {
|
|||
<p className="text-white text-2xl font-medium mr-1">{data?.name}</p>
|
||||
<Image src={verification} alt="" className="w-6 h-6" />
|
||||
</div>
|
||||
<p className="text-secondary text-sm text-center font-medium mt-3 px-4">
|
||||
{data?.bio}
|
||||
</p>
|
||||
</div>
|
||||
{data?.zones?.length !== 0 && (
|
||||
<Link
|
||||
href={`/zone/${data?.user_id}`}
|
||||
className="flex flex-row cursor-pointer bg-[#07050A] border-2 border-[#FFFFFF26] rounded-2xl h-12 items-center justify-center mt-4"
|
||||
>
|
||||
<Image src={zone} alt="" className="w-5 h-5" />
|
||||
<p className="text-white text-base font-medium ml-2">
|
||||
我的秘密空间
|
||||
</p>
|
||||
{data?.is_active_within_a_week === 1 && (
|
||||
<div className="flex justify-center items-center px-[3px] bg-primary rounded-[2px] ml-2">
|
||||
<p className="text-white text-[9px] font-medium">有更新</p>
|
||||
</div>
|
||||
)}
|
||||
</Link>
|
||||
)}
|
||||
<WechatBar
|
||||
price={Math.ceil(data?.wechat_coin_price / 9)}
|
||||
streamerMid={data?.mid}
|
||||
auto_response_message={data?.auto_response_message}
|
||||
onClickDownloadApp={copyAndSetCookieInviter}
|
||||
/>
|
||||
{data?.platforms?.map((item, index) => (
|
||||
<div
|
||||
key={index}
|
||||
onClick={() => window.open(item.url, "_blank")}
|
||||
className="flex flex-row cursor-pointer bg-[#07050A] border-2 border-[#FFFFFF26] rounded-2xl h-12 items-center justify-center mt-4"
|
||||
>
|
||||
<img src={item.icon.images[0].urls[0]} alt="" className="w-5 h-5" />
|
||||
<p className="text-white text-base font-medium ml-2">
|
||||
{item.link_name}|{item.nickname}
|
||||
</p>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
<div className="flex flex-row items-center bg-[#13121F] fixed bottom-0 left-0 w-full rounded-t-2xl z-20 p-4">
|
||||
<Image src={icon_border} alt="" className="w-12 h-12" />
|
||||
<div className="flex flex-col flex-1 ml-4">
|
||||
<p className="text-white text-base font-medium">铁粉空间</p>
|
||||
<p className="text-secondary text-sm font-medium">下载APP探索更多</p>
|
||||
</div>
|
||||
<Link className="p-2 pr-0" href="/" onClick={copyAndSetCookieInviter}>
|
||||
<p className="btn btn-sm bg-gradient-to-r from-[#FF668B] to-[#FF66F0] rounded-full text-white font-medium">
|
||||
立即下载
|
||||
<form className="flex flex-col items-center" onSubmit={handleSubmit}>
|
||||
<p className="text-white text-base mt-2 w-full max-w-sm">
|
||||
您的昵称:
|
||||
</p>
|
||||
</Link>
|
||||
<input
|
||||
type="text"
|
||||
name="name"
|
||||
placeholder="请输入您的昵称"
|
||||
value={name}
|
||||
onChange={(e) => setName(e.target.value)}
|
||||
className="input input-bordered input-md input-primary w-full max-w-sm"
|
||||
/>
|
||||
<p className="text-white text-base mt-2 w-full max-w-sm">
|
||||
想要的祝福语:
|
||||
</p>
|
||||
<input
|
||||
type="text"
|
||||
name="content"
|
||||
placeholder="请输入你想要的祝福语"
|
||||
value={content}
|
||||
onChange={(e) => setContent(e.target.value)}
|
||||
className="input input-bordered input-md input-primary w-full max-w-sm"
|
||||
/>
|
||||
<button className="btn btn-primary text-white rounded-full w-full max-w-sm mt-2">
|
||||
提交
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
|
|
|
@ -8,8 +8,7 @@ import slogan from "@/public/images/slogan.png";
|
|||
export default function LoginLayout({ children }) {
|
||||
const pathname = usePathname();
|
||||
return (
|
||||
<section className="flex flex-1 flex-col items-center">
|
||||
<Image src={slogan} priority alt="" className="mt-24 w-96" />
|
||||
<section className="flex flex-1 flex-col items-center mt-32">
|
||||
<div className="flex mt-4 h-10 justify-center">
|
||||
<div className="tabs tab-boxed w-72">
|
||||
<Link
|
||||
|
|
|
@ -87,7 +87,7 @@ export default function PrivatyPolicy() {
|
|||
fontSize: 16,
|
||||
}}
|
||||
>
|
||||
成都心意到了
|
||||
天津觅缘天使
|
||||
</span>
|
||||
</u>
|
||||
</strong>
|
||||
|
@ -114,7 +114,7 @@ export default function PrivatyPolicy() {
|
|||
fontSize: 16,
|
||||
}}
|
||||
>
|
||||
铁粉空间
|
||||
觅缘商城
|
||||
</span>
|
||||
</u>
|
||||
</strong>
|
||||
|
@ -132,7 +132,7 @@ export default function PrivatyPolicy() {
|
|||
</u>
|
||||
</strong>
|
||||
<span style={{ fontSize: 16 }}>(以下统称“</span>
|
||||
<span style={{ fontSize: 16 }}>铁粉空间</span>
|
||||
<span style={{ fontSize: 16 }}>觅缘商城</span>
|
||||
<span style={{ fontSize: 16 }}>
|
||||
”)之用户(以下统称“用户”或“您”)的个人信息和隐私安全。
|
||||
</span>
|
||||
|
@ -160,7 +160,7 @@ export default function PrivatyPolicy() {
|
|||
fontSize: 16,
|
||||
}}
|
||||
>
|
||||
铁粉空间
|
||||
觅缘商城
|
||||
</span>
|
||||
</u>
|
||||
</strong>
|
||||
|
@ -206,11 +206,11 @@ export default function PrivatyPolicy() {
|
|||
<span style={{ fontSize: 16 }}>
|
||||
简称“本政策”)仅适用于我们作为运营者的
|
||||
</span>
|
||||
<span style={{ fontSize: 16 }}>铁粉空间</span>
|
||||
<span style={{ fontSize: 16 }}>觅缘商城</span>
|
||||
<span style={{ fontSize: 16 }}>平台产品或服务,包括</span>
|
||||
<span style={{ fontSize: 16 }}>铁粉空间</span>
|
||||
<span style={{ fontSize: 16 }}>觅缘商城</span>
|
||||
<span style={{ fontSize: 16 }}>网站和</span>
|
||||
<span style={{ fontSize: 16 }}>铁粉空间</span>
|
||||
<span style={{ fontSize: 16 }}>觅缘商城</span>
|
||||
<span style={{ fontSize: 16 }}>移动应用(</span>
|
||||
<span style={{ fontSize: 16 }}>以下</span>
|
||||
<span style={{ fontSize: 16 }}>
|
||||
|
@ -372,7 +372,7 @@ export default function PrivatyPolicy() {
|
|||
}}
|
||||
>
|
||||
<span style={{ fontSize: 16 }}>3.邮箱反馈:发送电子邮件至</span>
|
||||
<span style={{ fontSize: 16 }}>xinyidaole</span>
|
||||
<span style={{ fontSize: 16 }}>miyuantianshi</span>
|
||||
<span style={{ fontSize: 16 }}>@</span>
|
||||
<span style={{ fontSize: 16 }}>outlook</span>
|
||||
<span style={{ fontSize: 16 }}>.</span>
|
||||
|
@ -626,11 +626,11 @@ export default function PrivatyPolicy() {
|
|||
}}
|
||||
>
|
||||
<span style={{ fontSize: 16 }}>1.</span>
|
||||
<span style={{ fontSize: 16 }}>铁粉空间</span>
|
||||
<span style={{ fontSize: 16 }}>觅缘商城</span>
|
||||
<span style={{ fontSize: 16 }}>
|
||||
平台产品或服务是指:我们及关联方通过合法拥有并运营的、标注名称包含“
|
||||
</span>
|
||||
<span style={{ fontSize: 16 }}>铁粉空间</span>
|
||||
<span style={{ fontSize: 16 }}>觅缘商城</span>
|
||||
<span style={{ fontSize: 16 }}>
|
||||
”的客户端应用程序以及官方网站等向您提供的产品与服务,包括但不限于图文发布
|
||||
</span>
|
||||
|
@ -1270,7 +1270,7 @@ export default function PrivatyPolicy() {
|
|||
fontSize: 16,
|
||||
}}
|
||||
>
|
||||
在您提交手机号码进行注册后,铁粉空间可通过您的手机号向您推广、介绍产品,发送业务通知或与您进行业务沟通。
|
||||
在您提交手机号码进行注册后,觅缘商城可通过您的手机号向您推广、介绍产品,发送业务通知或与您进行业务沟通。
|
||||
</span>
|
||||
</span>
|
||||
</p>
|
||||
|
@ -4001,11 +4001,11 @@ export default function PrivatyPolicy() {
|
|||
如果您对我们的回复不满意,您同意将纠纷提交
|
||||
</span>
|
||||
<span style={{ fontSize: 16 }}>至</span>
|
||||
<span style={{ fontSize: 16 }}>成都仲裁委员会仲裁</span>
|
||||
<span style={{ fontSize: 16 }}>天津仲裁委员会仲裁</span>
|
||||
<span style={{ fontSize: 16 }}>
|
||||
,并按照提交仲裁申请时有效的《成都仲裁委员会仲裁规则》最终解决。仲裁地应为中国
|
||||
,并按照提交仲裁申请时有效的《天津仲裁委员会仲裁规则》最终解决。仲裁地应为中国
|
||||
</span>
|
||||
<span style={{ fontSize: 16 }}>四川省成都市</span>
|
||||
<span style={{ fontSize: 16 }}>天津市</span>
|
||||
<span style={{ fontSize: 16 }}>。</span>
|
||||
</p>
|
||||
<p
|
||||
|
@ -4098,7 +4098,7 @@ export default function PrivatyPolicy() {
|
|||
<li>
|
||||
<span style={{ fontSize: "12.0000pt" }}>(四)</span>
|
||||
<span style={{ fontSize: "12.0000pt" }}>
|
||||
本政策最终解释权归属成都心意到了科技有限公司所有。
|
||||
本政策最终解释权归属天津觅缘天使科技有限公司所有。
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
@ -12,7 +12,7 @@ export default function UserAgreement() {
|
|||
}}
|
||||
>
|
||||
<strong>
|
||||
<span style={{ fontFamily: "宋体", fontSize: 29 }}>铁粉空间</span>
|
||||
<span style={{ fontFamily: "宋体", fontSize: 29 }}>觅缘商城</span>
|
||||
</strong>
|
||||
<strong>
|
||||
<span style={{ fontFamily: "宋体", fontSize: 29 }}>用户服务协议</span>
|
||||
|
@ -76,7 +76,7 @@ export default function UserAgreement() {
|
|||
<span style={{ fontFamily: "宋体", fontSize: 16 }}>
|
||||
欢迎您(用户)与我方“
|
||||
</span>
|
||||
<span style={{ fontFamily: "宋体", fontSize: 16 }}>铁粉空间</span>
|
||||
<span style={{ fontFamily: "宋体", fontSize: 16 }}>觅缘商城</span>
|
||||
<span style={{ fontFamily: "宋体", fontSize: 16 }}>
|
||||
运营方”共同签署本《用户服务协议》(下称“本协议”)并使用我方平台服务。
|
||||
</span>
|
||||
|
@ -270,12 +270,12 @@ export default function UserAgreement() {
|
|||
}}
|
||||
>
|
||||
<span style={{ fontFamily: "宋体", fontSize: 16 }}>我方平台:“</span>
|
||||
<span style={{ fontFamily: "宋体", fontSize: 16 }}>铁粉空间</span>
|
||||
<span style={{ fontFamily: "宋体", fontSize: 16 }}>觅缘商城</span>
|
||||
<span style={{ fontFamily: "宋体", fontSize: 16 }}>
|
||||
运营方”拥有并运营的
|
||||
</span>
|
||||
<span style={{ fontFamily: "宋体", fontSize: 16 }}>“</span>
|
||||
<span style={{ fontFamily: "宋体", fontSize: 16 }}>铁粉空间</span>
|
||||
<span style={{ fontFamily: "宋体", fontSize: 16 }}>觅缘商城</span>
|
||||
<span style={{ fontFamily: "宋体", fontSize: 16 }}>”</span>
|
||||
<span style={{ fontFamily: "宋体", fontSize: 16 }}>
|
||||
IOS和Android手机客户端软件以及其他各相关网站、网页、软件。
|
||||
|
@ -302,7 +302,7 @@ export default function UserAgreement() {
|
|||
<span style={{ fontFamily: "宋体", fontSize: 16 }}>
|
||||
我方:我方平台经营者,即“
|
||||
</span>
|
||||
<span style={{ fontFamily: "宋体", fontSize: 16 }}>铁粉空间</span>
|
||||
<span style={{ fontFamily: "宋体", fontSize: 16 }}>觅缘商城</span>
|
||||
<span style={{ fontFamily: "宋体", fontSize: 16 }}>运营方”。</span>
|
||||
</p>
|
||||
<p
|
||||
|
@ -448,7 +448,7 @@ export default function UserAgreement() {
|
|||
<span style={{ fontFamily: "宋体", fontSize: 16 }}>
|
||||
本协议由您与我方平台经营者“
|
||||
</span>
|
||||
<span style={{ fontFamily: "宋体", fontSize: 16 }}>铁粉空间</span>
|
||||
<span style={{ fontFamily: "宋体", fontSize: 16 }}>觅缘商城</span>
|
||||
<span style={{ fontFamily: "宋体", fontSize: 16 }}>
|
||||
运营方”共同缔结,本协议对您与我方平台经营者均具有合同效力。
|
||||
</span>
|
||||
|
@ -1804,7 +1804,7 @@ export default function UserAgreement() {
|
|||
}}
|
||||
>
|
||||
<span style={{ fontFamily: "宋体", fontSize: 16 }}>7.1我方将在“</span>
|
||||
<span style={{ fontFamily: "宋体", fontSize: 16 }}>铁粉空间</span>
|
||||
<span style={{ fontFamily: "宋体", fontSize: 16 }}>觅缘商城</span>
|
||||
<span style={{ fontFamily: "宋体", fontSize: 16 }}>
|
||||
”平台发行虚拟货币,即
|
||||
</span>
|
||||
|
@ -1818,7 +1818,7 @@ export default function UserAgreement() {
|
|||
<span style={{ fontFamily: "宋体", fontSize: 16 }}>金币</span>
|
||||
<span style={{ fontFamily: "宋体", fontSize: 16 }}>”</span>
|
||||
<span style={{ fontFamily: "宋体", fontSize: 16 }}>可用于购买“</span>
|
||||
<span style={{ fontFamily: "宋体", fontSize: 16 }}>铁粉空间</span>
|
||||
<span style={{ fontFamily: "宋体", fontSize: 16 }}>觅缘商城</span>
|
||||
<span style={{ fontFamily: "宋体", fontSize: 16 }}>
|
||||
”平台的各类增值服务,该等增值服务的价格均以
|
||||
</span>
|
||||
|
@ -1887,7 +1887,7 @@ export default function UserAgreement() {
|
|||
<span style={{ fontFamily: "宋体", fontSize: 16 }}>
|
||||
7.3您可以通过支付宝或其他“
|
||||
</span>
|
||||
<span style={{ fontFamily: "宋体", fontSize: 16 }}>铁粉空间</span>
|
||||
<span style={{ fontFamily: "宋体", fontSize: 16 }}>觅缘商城</span>
|
||||
<span style={{ fontFamily: "宋体", fontSize: 16 }}>”平台提供的</span>
|
||||
<span style={{ fontFamily: "宋体", fontSize: 16 }}>官方</span>
|
||||
<span style={{ fontFamily: "宋体", fontSize: 16 }}>充值途径为</span>
|
||||
|
@ -1947,13 +1947,13 @@ export default function UserAgreement() {
|
|||
<span style={{ fontFamily: "宋体", fontSize: 16 }}>金币</span>
|
||||
<span style={{ fontFamily: "宋体", fontSize: 16 }}>”</span>
|
||||
<span style={{ fontFamily: "宋体", fontSize: 16 }}>只能用于购买“</span>
|
||||
<span style={{ fontFamily: "宋体", fontSize: 16 }}>铁粉空间</span>
|
||||
<span style={{ fontFamily: "宋体", fontSize: 16 }}>觅缘商城</span>
|
||||
<span style={{ fontFamily: "宋体", fontSize: 16 }}>
|
||||
”平台上的各类增值服务,任何情况下不得与我方以外的第三方进行
|
||||
</span>
|
||||
<span style={{ fontFamily: "宋体", fontSize: 16 }}>虚拟货币</span>
|
||||
<span style={{ fontFamily: "宋体", fontSize: 16 }}>交易,亦不得在除“</span>
|
||||
<span style={{ fontFamily: "宋体", fontSize: 16 }}>铁粉空间</span>
|
||||
<span style={{ fontFamily: "宋体", fontSize: 16 }}>觅缘商城</span>
|
||||
<span style={{ fontFamily: "宋体", fontSize: 16 }}>
|
||||
”平台以外的第三方平台(如淘宝)上进行交易;如违反前述约定,造成您或第三方任何损失,我方不负任何责任,且如我方有理由怀疑您的
|
||||
</span>
|
||||
|
@ -2107,7 +2107,7 @@ export default function UserAgreement() {
|
|||
<span style={{ fontFamily: "宋体", fontSize: 16 }}>
|
||||
8.2我方平台的Logo、“
|
||||
</span>
|
||||
<span style={{ fontFamily: "宋体", fontSize: 16 }}>铁粉空间</span>
|
||||
<span style={{ fontFamily: "宋体", fontSize: 16 }}>觅缘商城</span>
|
||||
<span style={{ fontFamily: "宋体", fontSize: 16 }}>
|
||||
”等文字、图形及其组合,以及我方平台的其他标识、徵记、产品和服务名称均为我方或我方关联公司在中国或其它国家的商标,未经我方书面授权,任何人不得以任何方式展示、使用或作其他处理,也不得向他人表明您有权展示、使用或作其他处理。
|
||||
</span>
|
||||
|
|
BIN
app/favicon.ico
BIN
app/favicon.ico
Binary file not shown.
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
|
@ -1,9 +1,9 @@
|
|||
import "./globals.css";
|
||||
|
||||
export const metadata = {
|
||||
title: "铁粉空间APP",
|
||||
description: "与Ta永不失联",
|
||||
keywords: ["社交", "网红", "粉丝", "创作者", "变现", "平台", "铁粉", "空间"],
|
||||
title: "觅缘商城",
|
||||
description: "让你喜欢的博主为你送上祝福",
|
||||
keywords: ["商城", "祝福视频"],
|
||||
};
|
||||
|
||||
export const viewport = {
|
||||
|
|
120
app/page.jsx
120
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,68 +56,63 @@ export default function Home() {
|
|||
alt=""
|
||||
/>
|
||||
</div>
|
||||
<div className="flex flex-col flex-1 py-16 items-center justify-around z-10">
|
||||
<Image className="w-96" src={slogan} priority alt="" />
|
||||
{deviceType === "pc" && (
|
||||
<div className="flex flex-row gap-20">
|
||||
<a
|
||||
href="https://filecdn01.tiefen.fun/appdownload/ironfans1.4.2.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">
|
||||
立即下载
|
||||
</p>
|
||||
<div className="group-hover:opacity-0 opacity-100 transition-all duration-300 flex flex-col w-full h-full items-center justify-center">
|
||||
<svg viewBox="0 0 1024 1024" width="32" height="32">
|
||||
<path
|
||||
d="M192.128 240.298667a42.666667 42.666667 0 0 1 58.24 15.872l71.552 125.226666A467.712 467.712 0 0 1 511.957333 341.333333c61.056 0 119.381333 11.648 172.885334 32.853334l67.413333-118.016a42.666667 42.666667 0 0 1 74.112 42.325333l-65.322667 114.304a469.333333 469.333333 0 0 1 217.941334 350.976A42.666667 42.666667 0 0 1 936.533333 810.666667H87.466667a42.666667 42.666667 0 0 1-42.453334-46.890667 469.12 469.12 0 0 1 202.410667-340.821333L176.256 298.496a42.666667 42.666667 0 0 1 15.872-58.197333zM320 661.333333a42.666667 42.666667 0 1 0 0-85.333333 42.666667 42.666667 0 0 0 0 85.333333z m426.666667-42.666666a42.666667 42.666667 0 1 0-85.333334 0 42.666667 42.666667 0 0 0 85.333334 0z"
|
||||
fill="#ffffff"
|
||||
></path>
|
||||
</svg>
|
||||
<p className="text-white text-xs ">Android</p>
|
||||
</div>
|
||||
</a>
|
||||
<div 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 text-center p-3 absolute flex w-full h-full items-center justify-center text-white text-xs">
|
||||
扫描下方二维码
|
||||
</p>
|
||||
<div className="group-hover:opacity-0 opacity-100 transition-all duration-300 flex flex-col w-full h-full items-center justify-center">
|
||||
<svg viewBox="0 0 1024 1024" width="32" height="32">
|
||||
<path
|
||||
d="M549.973333 117.077333c-24.704 34.944-38.101333 76.757333-39.850666 124.373334 8.021333-0.896 16-1.962667 23.893333-3.2 8.96-1.408 16.341333-2.986667 21.76-4.608 16.341333-5.632 34.816-18.048 54.784-36.778667 21.333333-21.290667 37.461333-44.842667 47.744-69.888 9.813333-25.898667 14.762667-49.408 14.762667-69.930667v-9.045333l-1.152-5.162667c-56.149333 14.122667-97.152 39.082667-121.941334 74.24z"
|
||||
fill="#ffffff"
|
||||
></path>
|
||||
<path
|
||||
d="M200.533333 279.04C248.490667 232.064 307.114667 213.333333 349.482667 213.333333c41.813333 0 76.629333 18.261333 101.546666 31.402667l2.944 1.536c28.16 14.762667 45.909333 23.125333 65.493334 23.125333 20.224 0 39.509333-8.789333 71.082666-23.850666l0.597334-0.298667C619.733333 231.594667 657.92 213.333333 704 213.333333c63.701333 0 116.693333 32.256 158.421333 86.528a42.666667 42.666667 0 0 1-5.205333 57.642667c-45.482667 41.173333-67.84 91.690667-67.84 154.496 0 87.04 61.312 125.44 90.837333 143.018667a42.666667 42.666667 0 0 1 18.432 50.816c-10.666667 30.250667-30.208 68.181333-49.92 101.333333-19.370667 32.682667-41.728 65.493333-59.306666 83.626667l-0.896 0.981333c-12.885333 13.269333-27.648 28.501333-45.568 39.424-20.437333 12.373333-42.794667 18.133333-69.888 18.133333-15.957333 0-31.872-3.456-45.610667-7.253333-12.458667-3.413333-25.557333-7.850667-37.461333-11.861333l-4.053334-1.365334c-28.458667-9.6-49.792-16-66.474666-16-15.957333 0-33.706667 5.973333-59.605334 15.573334l-3.84 1.408c-22.016 8.234667-52.053333 19.498667-82.474666 19.498666-64.426667 0-105.6-50.005333-118.357334-65.450666a221.952 221.952 0 0 0-2.304-2.773334l-1.152-1.322666c-18.346667-21.333333-136.362667-157.952-136.362666-367.786667 0-109.184 35.797333-184.704 85.077333-232.96z"
|
||||
fill="#ffffff"
|
||||
></path>
|
||||
</svg>
|
||||
<p className="text-white text-xs ">ios</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
<div className="flex flex-col justify-center items-center">
|
||||
<Image className="w-28 rounded-2xl" src={qrcode} priority alt="" />
|
||||
{deviceType === "pc" && (
|
||||
<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.2.apk"
|
||||
}
|
||||
>
|
||||
安装
|
||||
</a>
|
||||
</>
|
||||
)}
|
||||
<div className="flex flex-col flex-1 py-16 items-center justify-center gap-10 z-10">
|
||||
<p className="text-white font-medium text-2xl">
|
||||
您希望谁为您送上祝福?
|
||||
</p>
|
||||
<div className="flex flex-row flex-wrap justify-center gap-2">
|
||||
<Link
|
||||
href="/253020"
|
||||
className="flex flex-col w-32 rounded-lg overflow-hidden"
|
||||
>
|
||||
<img
|
||||
className="w-full aspect-square object-cover"
|
||||
src="https://file.wishpaldev.tech/imgprod/dd/e8/bf6d-f643-4853-86ab-9df91ad4e191"
|
||||
alt=""
|
||||
/>
|
||||
<p className="text-white bg-[#FFFFFF1A] text-center font-medium py-1">
|
||||
震震昊看世界
|
||||
</p>
|
||||
</Link>
|
||||
<Link
|
||||
href="/724471"
|
||||
className="flex flex-col w-32 rounded-lg overflow-hidden"
|
||||
>
|
||||
<img
|
||||
className="w-full aspect-square object-cover"
|
||||
src="https://file.wishpaldev.tech/imgprod/64/81/4605-2c65-4be9-8688-7ad4d9a0092d"
|
||||
alt=""
|
||||
/>
|
||||
<p className="text-white bg-[#FFFFFF1A] text-center font-medium py-1">
|
||||
白仔游世界🌸
|
||||
</p>
|
||||
</Link>
|
||||
<Link
|
||||
href="/898644"
|
||||
className="flex flex-col w-32 rounded-lg overflow-hidden"
|
||||
>
|
||||
<img
|
||||
className="w-full aspect-square object-cover"
|
||||
src="https://file.wishpaldev.tech/imgprod/88/db/370c-a850-4d2c-a7b4-950c9a722d86"
|
||||
alt=""
|
||||
/>
|
||||
<p className="text-white bg-[#FFFFFF1A] text-center font-medium py-1">
|
||||
Quyen
|
||||
</p>
|
||||
</Link>
|
||||
<Link
|
||||
href="/442668"
|
||||
className="flex flex-col w-32 rounded-lg overflow-hidden"
|
||||
>
|
||||
<img
|
||||
className="w-full aspect-square object-cover"
|
||||
src="https://file.wishpaldev.tech/imgprod/f7/b8/fc3c-0279-407a-828c-8b1b92a0b9a4"
|
||||
alt=""
|
||||
/>
|
||||
<p className="text-white bg-[#FFFFFF1A] text-center font-medium py-1">
|
||||
Kasia
|
||||
</p>
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
<Footer />
|
||||
|
|
276
app/pay/page.jsx
276
app/pay/page.jsx
|
@ -7,275 +7,23 @@ import { generateSignature } from "@/utils/crypto";
|
|||
import webviewBaseRequest from "@/utils/webviewBaseRequest";
|
||||
|
||||
export default function Pay() {
|
||||
const router = useRouter();
|
||||
|
||||
const alipayBlock = () => {
|
||||
const base = webviewBaseRequest();
|
||||
if (base?.b_mid === 161) {
|
||||
createOrder("alipay_h5");
|
||||
return;
|
||||
}
|
||||
const handleClick = () => {
|
||||
Toast.show({
|
||||
content: "支付渠道维护升级中,请24小时后再试",
|
||||
content: "支付渠道不可用,请耐心等待",
|
||||
});
|
||||
};
|
||||
|
||||
//商品列表
|
||||
const [productList, setProductList] = useState([]);
|
||||
|
||||
//选择的价格档位
|
||||
const [selectedPrice, setSelectedPrice] = useState({});
|
||||
|
||||
//选择任意金额充值
|
||||
const [customCoin, setCustomCoin] = useState({ selected: false, num: 1000 });
|
||||
|
||||
//任意金额充值的金币数量
|
||||
const handleChangeCustomCoin = (e) => {
|
||||
let newValue = parseInt(e.target.value, 10);
|
||||
// 确保输入的值在最小值和最大值范围内
|
||||
if (newValue >= 0 && newValue <= 100000) {
|
||||
setCustomCoin({ ...customCoin, num: newValue });
|
||||
} else if (isNaN(newValue)) {
|
||||
setCustomCoin({ ...customCoin, num: 0 });
|
||||
} else if (newValue > 100000) {
|
||||
setCustomCoin({ ...customCoin, num: 100000 });
|
||||
}
|
||||
};
|
||||
|
||||
//获取当前充值档位
|
||||
const [isFetching, setIsFetching] = useState(true);
|
||||
useEffect(() => {
|
||||
const getData = async () => {
|
||||
const base = webviewBaseRequest();
|
||||
const body = { ...base };
|
||||
const signature = generateSignature(body);
|
||||
try {
|
||||
const response = await fetch(
|
||||
`/api/vas/get_coins_product_list?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;
|
||||
}
|
||||
setProductList(data.data.list_alipay_h5);
|
||||
setIsFetching(false);
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
};
|
||||
getData();
|
||||
}, []);
|
||||
|
||||
//创建充值订单
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
const createOrder = 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 base = webviewBaseRequest();
|
||||
const body = {
|
||||
...base,
|
||||
product_id: customCoin.selected ? "h5_custom_coin" : selectedPrice.id,
|
||||
custom_coins: customCoin.selected ? customCoin.num : 0,
|
||||
pay_type: type,
|
||||
from: "app",
|
||||
};
|
||||
|
||||
//如果是微信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 "alipay_h5":
|
||||
router.push(`${data.data.alipay_h5_param_str}`);
|
||||
break;
|
||||
case "wxpay_h5":
|
||||
router.push(
|
||||
`https://weixin.tiefen.fun/pay/wxpay_h5/${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 PriceItem = ({ item }) => {
|
||||
const handleClickPrice = (item) => {
|
||||
setSelectedPrice(item);
|
||||
setCustomCoin({ ...customCoin, selected: false });
|
||||
};
|
||||
return (
|
||||
<div className="basis-1/3 p-2">
|
||||
<button
|
||||
onClick={() => handleClickPrice(item)}
|
||||
className={
|
||||
selectedPrice.id === item.id
|
||||
? "flex flex-col w-full py-4 border bg-[#FF61B030] border-primary rounded-lg items-center"
|
||||
: "flex flex-col w-full py-4 border bg-[#FFFFFF1A] border-secondary rounded-lg items-center"
|
||||
}
|
||||
>
|
||||
<p
|
||||
className={
|
||||
selectedPrice.id === item.id
|
||||
? "text-base text-primary"
|
||||
: "text-base text-secondary"
|
||||
}
|
||||
>
|
||||
{item.name}
|
||||
</p>
|
||||
<p
|
||||
className={
|
||||
selectedPrice.real_price === item.real_price
|
||||
? "text-base text-primary"
|
||||
: "text-base text-secondary"
|
||||
}
|
||||
>
|
||||
¥{item.real_price / 100}
|
||||
</p>
|
||||
</button>
|
||||
</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>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<section className="flex flex-1 justify-center container">
|
||||
{isLoading && (
|
||||
<span className="absolute top-1/2 loading loading-spinner loading-lg"></span>
|
||||
)}
|
||||
<div className="flex flex-1 flex-col p-4">
|
||||
<div
|
||||
onClick={() => router.push("/pay/info")}
|
||||
className="flex flex-row items-center bg-neutral rounded-lg w-full p-2"
|
||||
>
|
||||
<svg viewBox="0 0 1024 1024" width="24" height="24">
|
||||
<path
|
||||
d="M512 65.983389c-245.952318 0-446.016611 200.064292-446.016611 446.016611S266.047682 958.016611 512 958.016611 958.016611 757.952318 958.016611 512 757.952318 65.983389 512 65.983389zM544.00086 736.00086c0 17.695686-14.303454 32.00086-32.00086 32.00086s-32.00086-14.303454-32.00086-32.00086L479.99914 448c0-17.695686 14.303454-32.00086 32.00086-32.00086 17.695686 0 32.00086 14.303454 32.00086 32.00086L544.00086 736.00086zM512 352.00086c-26.496224 0-48.00043-21.53689-48.00043-48.00043 0-26.527187 21.504206-48.00043 48.00043-48.00043s48.00043 21.471523 48.00043 48.00043C560.00043 330.46397 538.496224 352.00086 512 352.00086z"
|
||||
fill="#FFF04C"
|
||||
></path>
|
||||
</svg>
|
||||
<div className="ml-2 flex flex-col">
|
||||
<p className="text-base font-semibold text-white">支付遇到问题?</p>
|
||||
<p className="text-xs text-secondary">
|
||||
无法唤起支付宝APP,点击支付无反应?
|
||||
</p>
|
||||
</div>
|
||||
<div className="ml-auto">
|
||||
<svg viewBox="0 0 1024 1024" width="24" height="24">
|
||||
<path
|
||||
d="M761.055557 532.128047c0.512619-0.992555 1.343475-1.823411 1.792447-2.848649 8.800538-18.304636 5.919204-40.703346-9.664077-55.424808L399.935923 139.743798c-19.264507-18.208305-49.631179-17.344765-67.872168 1.888778-18.208305 19.264507-17.375729 49.631179 1.888778 67.872168l316.960409 299.839269L335.199677 813.631716c-19.071845 18.399247-19.648112 48.767639-1.247144 67.872168 9.407768 9.791372 21.984142 14.688778 34.560516 14.688778 12.000108 0 24.000215-4.479398 33.311652-13.439914l350.048434-337.375729c0.672598-0.672598 0.927187-1.599785 1.599785-2.303346 0.512619-0.479935 1.056202-0.832576 1.567101-1.343475C757.759656 538.879828 759.199462 535.391265 761.055557 532.128047z"
|
||||
fill="#ffffff"
|
||||
></path>
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
<p className="text-white text-base font-semibold my-2">选择充值金额</p>
|
||||
<div className="flex flex-wrap">
|
||||
{productList?.map((item) => (
|
||||
<PriceItem key={item.id} item={item} />
|
||||
))}
|
||||
{/* 任意金额充值 */}
|
||||
<div className="basis-1/3 p-2">
|
||||
<button
|
||||
onClick={() => {
|
||||
setSelectedPrice([]);
|
||||
setCustomCoin({ ...customCoin, selected: true });
|
||||
}}
|
||||
className={
|
||||
customCoin.selected
|
||||
? "flex flex-col w-full h-full py-4 border bg-[#FF61B030] border-primary rounded-lg items-center justify-center"
|
||||
: "flex flex-col w-full h-full py-4 border bg-[#FFFFFF1A] border-secondary rounded-lg items-center justify-center"
|
||||
}
|
||||
>
|
||||
<p
|
||||
className={
|
||||
customCoin.selected
|
||||
? "text-base text-primary"
|
||||
: "text-base text-secondary"
|
||||
}
|
||||
>
|
||||
自定义金币
|
||||
</p>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
{customCoin.selected && (
|
||||
<div className="px-2 mt-2">
|
||||
<input
|
||||
type="number"
|
||||
name="custom_price"
|
||||
placeholder="请输入金币数额"
|
||||
value={customCoin.num.toString()}
|
||||
onChange={handleChangeCustomCoin}
|
||||
className="input input-bordered input-md input-primary w-full"
|
||||
/>
|
||||
<p className="text-secondary text-base mt-2">
|
||||
预估金额:¥{customCoin.num / 10}
|
||||
</p>
|
||||
</div>
|
||||
)}
|
||||
<div className="flex mt-auto mb-12">
|
||||
<div className="flex flex-1 flex-col items-center py-16 p-4">
|
||||
<p className="text-secondary text-base font-semibold my-2">
|
||||
您的订单价格为
|
||||
</p>
|
||||
<p className="text-white text-3xl font-semibold my-2">¥50</p>
|
||||
<div className="flex flex-col w-full gap-4 mt-4">
|
||||
<div className="w-full px-2">
|
||||
<button
|
||||
onClick={() => createOrder("alipay_h5")}
|
||||
onClick={handleClick}
|
||||
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">
|
||||
|
@ -287,9 +35,9 @@ export default function Pay() {
|
|||
<p className="text-white text-base ml-1">支付宝</p>
|
||||
</button>
|
||||
</div>
|
||||
{/* <div className="w-full px-2">
|
||||
<div className="w-full px-2">
|
||||
<button
|
||||
onClick={() => createOrder("wxpay_h5")}
|
||||
onClick={handleClick}
|
||||
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">
|
||||
|
@ -300,7 +48,7 @@ export default function Pay() {
|
|||
</svg>
|
||||
<p className="text-white text-base ml-1">微信支付</p>
|
||||
</button>
|
||||
</div> */}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
|
|
@ -55,13 +55,6 @@ export default function AuthBar({ onNotLoginedClick = () => {} }) {
|
|||
showDetail ? "max-h-32" : ""
|
||||
}`}
|
||||
>
|
||||
<div
|
||||
onClick={handlePurchased}
|
||||
className="flex flex-row cursor-pointer items-center justify-center p-2"
|
||||
>
|
||||
<p className="text-white text-base font-medium ml-2">已购</p>
|
||||
</div>
|
||||
<div className="bg-[#FFFFFF26] h-0.5 w-4/5"></div>
|
||||
<div
|
||||
onClick={handleSignOut}
|
||||
className="flex flex-row cursor-pointer items-center justify-center p-2"
|
||||
|
|
|
@ -11,24 +11,13 @@ export default function Footer() {
|
|||
href="http://beian.miit.gov.cn"
|
||||
className="text-xs text-secondary"
|
||||
>
|
||||
蜀ICP备2023025827号-2
|
||||
</a>
|
||||
<span className="text-xs text-secondary">
|
||||
|
|
||||
</span>
|
||||
<a
|
||||
target="_blank"
|
||||
href="https://beian.mps.gov.cn/#/query/webSearch?code=51015602000741"
|
||||
className="text-xs text-secondary"
|
||||
>
|
||||
<span>川公网安备51015602000741 </span>
|
||||
<Image src={beian} alt="beian" className="w-4" />
|
||||
津ICP备2023007056号-1
|
||||
</a>
|
||||
<span className="text-xs text-secondary">
|
||||
|
|
||||
</span>
|
||||
<a className="text-xs text-secondary">
|
||||
Copyright © 2023-2024 成都心意到了科技有限公司
|
||||
Copyright © 2023-2024 天津觅缘天使科技有限公司
|
||||
</a>
|
||||
</div>
|
||||
</footer>
|
||||
|
|
|
@ -4,7 +4,7 @@ const nextConfig = {
|
|||
return [
|
||||
{
|
||||
source: "/api/:path*",
|
||||
destination: "https://api.tiefen.fun/api/:path*",
|
||||
destination: "https://api.wishpal.cn/api/:path*",
|
||||
},
|
||||
{
|
||||
source: "/cors/:path*",
|
||||
|
|
Loading…
Reference in New Issue