Compare commits

...

13 Commits

Author SHA1 Message Date
yezian 0911faeefa 修复app无法调起微信支付的bug 2025-03-17 20:18:25 +08:00
yezian a2e99c58b2 增加微信h5支付逻辑 2025-03-17 19:51:11 +08:00
yezian 38d69b98c1 修改微信支付在h5的跳转模式 2025-03-14 19:55:23 +08:00
yezian 14dc556d2b 金币充值和会员增加微信支付 2025-03-14 17:45:52 +08:00
yezian dd4761a74a 增加关于我们页面 2025-02-24 17:29:14 +08:00
yezian 4f97241268 增加备用支付渠道;提现增加窗口期 2025-02-14 16:25:04 +08:00
yezian 68747ac67e 增加元宵活动页面;card组件从cdn获取图片;活动结束后增加下载app按钮 2025-02-10 14:26:53 +08:00
yezian 17fed7a6c0 newyear_activity (#105)
Reviewed-on: https://git.wishpal.cn/wishpal_ironfan/tiefen_space_web/pulls/105
2025-01-26 13:38:21 +08:00
yezian 6ce8e06e61 Merge pull request '修改收银台样式' (#103) from anln_1.1 into main
Reviewed-on: https://git.wishpal.cn/wishpal_ironfan/tiefen_space_web/pulls/103
2025-01-23 17:52:19 +08:00
al 9eba84edcc 修改收银台样式 2025-01-23 17:51:49 +08:00
yezian 2c58736b6f anln (#101)
Co-authored-by: al <al@cdhncy.com>
Reviewed-on: https://git.wishpal.cn/wishpal_ironfan/tiefen_space_web/pulls/101
2025-01-21 18:24:41 +08:00
yezian d3c9841e89 Merge pull request '增加净网通知文档' (#99) from content_cleaning_notice into main
Reviewed-on: https://git.wishpal.cn/wishpal_ironfan/tiefen_space_web/pulls/99
2025-01-20 15:15:38 +08:00
yezian c0211b50d0 增加净网通知文档 2025-01-20 15:14:43 +08:00
17 changed files with 1219 additions and 77 deletions

25
app/about/page.jsx Normal file
View File

@ -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>
);
}

View File

@ -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>
);
}

View File

@ -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>;
}

View File

@ -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={() => {
//appwebview
const userAgent = navigator.userAgent;
if (/FromWebview/i.test(userAgent)) {
window.ReactNativeWebView.postMessage(
JSON.stringify({
type: "NAVIGATE",
data: {
page: "SpaceIntroduce",
params: { mid: item?.mid },
},
})
);
return;
}
//h5iframe
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();
// 2025218
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>
);
}

View File

@ -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={() => {
//appwebview
const userAgent = navigator.userAgent;
if (/FromWebview/i.test(userAgent)) {
window.ReactNativeWebView.postMessage(
JSON.stringify({
type: "NAVIGATE",
data: {
page: "SpaceIntroduce",
params: { mid: item?.mid },
},
})
);
return;
}
//h5iframe
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();
// 202525
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>
);
}

View File

@ -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]"

View File

@ -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]"

View File

@ -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]">

File diff suppressed because one or more lines are too long

View File

@ -16,6 +16,12 @@ export default function Footer() {
<span className="text-xs text-secondary">
&nbsp;&nbsp;&nbsp;&nbsp;
</span>
<a href="/about" className="text-xs text-secondary">
关于我们
</a>
<span className="text-xs text-secondary">
&nbsp;&nbsp;&nbsp;&nbsp;
</span>
{/* <a
target="_blank"
href="https://beian.mps.gov.cn/#/query/webSearch?code=51015602000741"
@ -28,7 +34,7 @@ export default function Footer() {
&nbsp;&nbsp;&nbsp;&nbsp;
</span> */}
<a className="text-xs text-secondary">
Copyright © 2023-2024 承德望月网络科技有限公司
Copyright © 2023-2025 承德望月网络科技有限公司
</a>
</div>
</footer>

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB