diff --git a/app/[user_id]/_components/WechatBar/index.jsx b/app/[user_id]/_components/WechatBar/index.jsx index 64d4791..fd04b80 100644 --- a/app/[user_id]/_components/WechatBar/index.jsx +++ b/app/[user_id]/_components/WechatBar/index.jsx @@ -5,7 +5,7 @@ import React, { useState } from "react"; import { useRouter } from "next/navigation"; import baseRequest from "@/utils/baseRequest"; import { generateSignature } from "@/utils/crypto"; -import { Toast } from "antd-mobile"; +import { Toast, Modal } from "antd-mobile"; import { checkAuth } from "@/utils/auth"; export default function WechatBar({ @@ -111,7 +111,29 @@ export default function WechatBar({ >
document.getElementById("comfirm_modal").showModal()} + onClick={() => + Modal.alert({ + showCloseButton: true, + confirmText: "立即购买", + onConfirm: () => handlePurchase("alipay_h5"), + content: ( +
+

+ 购买成功后请到"账号"-"已购"添加Ta的微信,若超72小时未添加成功请联系客服 +

+

+ 确认购买即视为同意 + + 《用户充值协议》 + +

+
+ ), + }) + } >
- -
-

- 购买成功后请到"账号"-"已购"添加Ta的微信,若超72小时未添加成功请联系客服 -

-

- 确认购买即视为同意 - - 《用户充值协议》 - -

-
- -
- -
-
-
-
); } diff --git a/app/download/[user_id]/page.jsx b/app/download/[user_id]/page.jsx index ff69da6..f46ac9d 100644 --- a/app/download/[user_id]/page.jsx +++ b/app/download/[user_id]/page.jsx @@ -6,6 +6,7 @@ import baseRequest from "@/utils/baseRequest"; import { generateSignature } from "@/utils/crypto"; import { Toast } from "antd-mobile"; import copy from "@/utils/copy"; +import IosInstallStepModal from "@/components/IosInstallStepModal/page"; export default function Download({ params }) { const [deviceType, setDeviceType] = useState(""); @@ -66,6 +67,10 @@ export default function Download({ params }) { getData(); }, []); + //ios安装教程Modal是否展示 + const [isIosInstallStepModalVisible, setIsIosInstallStepModalVisible] = + useState(false); + return (
@@ -120,7 +125,7 @@ export default function Download({ params }) { {deviceType === "pc" && (

@@ -168,21 +173,29 @@ export default function Download({ params }) {

{deviceType !== "pc" && ( - <> - { + copyInviter(); + if (deviceType === "ios") setIsIosInstallStepModalVisible(true); + const url = deviceType === "ios" ? "itms-services://?action=download-manifest&url=https://filecdn01.tiefen.fun/appdownload/ironfans.plist" - : "https://filecdn01.tiefen.fun/appdownload/ironfans1.4.6.apk" + : "https://filecdn01.tiefen.fun/appdownload/ironfans1.4.8.apk"; + window.location.href = url; + if (deviceType === "ios") { + setIsIosInstallStepModalVisible(true); } - > - 安装 - - + }} + > + 安装 +
)} +
- +
{children}
diff --git a/app/page.jsx b/app/page.jsx index 0599ba0..4b95110 100644 --- a/app/page.jsx +++ b/app/page.jsx @@ -4,6 +4,7 @@ import React, { useState, useEffect } from "react"; import InOtherApp from "@/components/InOtherApp"; import Footer from "@/components/Footer"; import Link from "next/link"; +import IosInstallStepModal from "@/components/IosInstallStepModal/page"; export default function Home() { const [deviceType, setDeviceType] = useState(""); @@ -18,6 +19,11 @@ export default function Home() { setDeviceType("pc"); } }, []); + + //ios安装教程Modal是否展示 + const [isIosInstallStepModalVisible, setIsIosInstallStepModalVisible] = + useState(false); + return (
@@ -99,7 +105,7 @@ export default function Home() { {deviceType === "pc" && ( +
); diff --git a/app/pay/info/page.jsx b/app/pay/info/page.jsx index fd11b3d..d054684 100644 --- a/app/pay/info/page.jsx +++ b/app/pay/info/page.jsx @@ -41,7 +41,7 @@ export default function Info() { 如您未在使用中国大陆地区的网络,支付结果可能会延迟发送,请您耐心等候。如超过一分钟您仍未收到支付完成的消息提示,请尝试联系人工客服。

- 如仍有其他支付问题,请返回充值页面,点击右下角人工充值。(工作日9:00-21:00) + 如仍有其他支付问题,请返回我的页面,联系客服进行充值。(每日10:00-24:00)

diff --git a/app/purchased/page.jsx b/app/purchased/page.jsx index a7c76b7..5f5ee39 100644 --- a/app/purchased/page.jsx +++ b/app/purchased/page.jsx @@ -1,7 +1,7 @@ "use client"; import React, { useState, useEffect } from "react"; import AuthBar from "@/components/AuthBar"; -import { Toast } from "antd-mobile"; +import { Toast, Modal } from "antd-mobile"; import { checkAuth } from "@/utils/auth"; import { useRouter } from "next/navigation"; import baseRequest from "@/utils/baseRequest"; @@ -65,7 +65,6 @@ export default function Purchased() { getData(); }, []); - const [currentWechat, setCurrentWechat] = useState(""); const getWechat = async (streamerMid) => { // 获取微信 try { @@ -94,7 +93,7 @@ export default function Purchased() { }); return; } - setCurrentWechat(detailData.data.wechat_contact); + return detailData.data.wechat_contact; } catch (error) { console.error(error); } @@ -103,11 +102,24 @@ export default function Purchased() { const DirectGetWechatItem = ({ item }) => { //点击查看微信 const handleClick = async () => { - await getWechat(item?.account.mid); - setTimeout( - () => document.getElementById("get_wechat_modal").showModal(), - 100 - ); + const wechat = await getWechat(item?.account.mid); + Modal.alert({ + showCloseButton: true, + confirmText: "复制", + onConfirm: () => { + copy(wechat); + Toast.show({ + content: "复制成功", + }); + }, + content: ( +
+

+ Ta的微信号:{wechat} +

+
+ ), + }); }; //点击主播 @@ -162,37 +174,6 @@ export default function Purchased() { ); }; - const GetWechatModal = () => { - const handleCopy = () => { - copy(currentWechat); - Toast.show({ - content: "复制成功", - }); - }; - return ( - -
-

- Ta的微信号:{currentWechat} -

-
-
- - -
-
-
-
- ); - }; - const SubmitUserWechatItem = ({ item }) => { const [wechat, setWechat] = useState(""); const [remarks, setRemarks] = useState(""); @@ -341,7 +322,6 @@ export default function Purchased() { return ; } })} -
); } diff --git a/app/vip/page.jsx b/app/vip/page.jsx index 0232f2a..5acaf5d 100644 --- a/app/vip/page.jsx +++ b/app/vip/page.jsx @@ -82,8 +82,13 @@ export default function Vip() { //创建充值订单 const [isLoading, setIsLoading] = useState(false); const createOrder = async (type = "alipay_h5") => { - const webviewBase = webviewBaseRequest(); - let base = getBase(webviewBase) + const base = webviewBaseRequest(); + if (base?.b_dt === 1) { + Toast.show({ + content: "ios暂时无法开通会员,请等待版本更新", + }); + return; + } const body = { ...base, product_id: "membership", diff --git a/app/zone/[user_id]/page.jsx b/app/zone/[user_id]/page.jsx index 9288dc6..f42e82f 100644 --- a/app/zone/[user_id]/page.jsx +++ b/app/zone/[user_id]/page.jsx @@ -1,15 +1,16 @@ "use client"; import React, { useState, useEffect } from "react"; -import { Toast } from "antd-mobile"; +import { Toast, Modal } from "antd-mobile"; import baseRequest from "@/utils/baseRequest"; import { generateSignature } from "@/utils/crypto"; import copy from "@/utils/copy"; import { setCookie } from "cookies-next"; -import Link from "next/link"; import InOtherApp from "@/components/InOtherApp"; +import { useRouter } from "next/navigation"; export default function Zone({ params }) { + const router = useRouter(); //页面数据 const [data, setData] = useState({}); useEffect(() => { @@ -46,12 +47,24 @@ export default function Zone({ params }) { getData(); }, []); - //将主播链接复制到剪贴板,并存cookie - const copyAndSetCookieInviter = () => { + //将主播链接复制到剪贴板,并存cookie,并打开modal + const showModal = () => { setCookie("inviter", data?.streamer_ext?.user_id); copy( `【${data?.streamer_ext?.name}】『ID:${data?.streamer_ext?.user_id}』,复制此条消息,打开铁粉空间APP,查看详情https://tiefen.fun/zone/${data?.streamer_ext?.user_id}` ); + Modal.alert({ + showCloseButton: true, + confirmText: "前往下载", + onConfirm: () => router.push("/"), + content: ( +
+

+ {`请打开或下载【铁粉空间】APP,根据APP内弹窗指引加入空间。如未弹出,请在APP搜索ID:${data?.streamer_ext?.user_id},加入空间。`} +

+
+ ), + }); }; return ( @@ -143,10 +156,7 @@ export default function Zone({ params }) {
{ - copyAndSetCookieInviter(); - document.getElementById("comfirm_modal").showModal(); - }} + onClick={showModal} >
{ - copyAndSetCookieInviter(); - document.getElementById("comfirm_modal").showModal(); - }} + onClick={showModal} >
{ - copyAndSetCookieInviter(); - document.getElementById("comfirm_modal").showModal(); - }} + onClick={showModal} > 立即加入
@@ -206,26 +210,6 @@ export default function Zone({ params }) { 3、本平台不提供违法及色情内容,如您发现空间内存在以上内容,请联系人工客服举报处理。

- -
-

- {`请打开或下载【铁粉空间】APP,根据APP内弹窗指引加入空间。如未弹出,请在APP搜索ID:${data?.streamer_ext?.user_id},加入空间。`} -

-
- -

确认

- -
- -
-
-
-
); } diff --git a/components/IosInstallStepModal/page.jsx b/components/IosInstallStepModal/page.jsx new file mode 100644 index 0000000..d977fc2 --- /dev/null +++ b/components/IosInstallStepModal/page.jsx @@ -0,0 +1,111 @@ +"use client"; + +import React, { useEffect, useState } from "react"; +import { Mask } from "antd-mobile"; +import Link from "next/link"; + +export default function IosInstallStepModal({ isVisible, setIsVisible }) { + const [stepIndex, setStepIndex] = useState(1); + useEffect(() => { + if (!isVisible) { + setStepIndex(1); + return; + } + const timeoutId = setTimeout( + () => + setStepIndex((prev) => { + if (prev === 6) return 1; + return prev + 1; + }), + 3000 + ); + return () => { + clearTimeout(timeoutId); + }; + }, [isVisible, stepIndex]); + + return ( + setIsVisible(false)} + opacity="thick" + > +
+
+ setIsVisible(!isVisible)} + className="absolute right-4 top-4" + viewBox="0 0 1024 1024" + width="20" + height="20" + > + + + +
+

+ 请等待安装完成,然后开始设置 +

+

+ 若安装后无法正常使用,请删除旧版APP +

+

+ 请务必按以下步骤进行设置,详细 + + 安装教程 + +

+
+ +
+ {stepIndex === 1 && ( +

+ 第1步:打开【设置】 +

+ )} + {stepIndex === 2 && ( +

+ 第2步:点击【通用】 +

+ )} + {stepIndex === 3 && ( +

+ 第3步:点击【VPN与设备管理】 +

+ )} + {stepIndex === 4 && ( +

+ 第4步:点击【证书】 +

+ )} + {stepIndex === 5 && ( +

+ 第5步:点击【信任证书】 +

+ )} + {stepIndex === 6 && ( +

+ 第6步:在弹出页点击【信任】 +

+ )} +
+
+
+
+ ); +}