From a19c17170a7ce023543fb113e44466135b2da92a Mon Sep 17 00:00:00 2001 From: al Date: Mon, 22 Jul 2024 14:38:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/globals.css | 6 +- app/login/page.js | 4 +- app/my/setting/aboutUs/page.js | 4 +- app/my/wallet/page.js | 83 ++++++++++++------- app/space/[id]/page.js | 16 +++- .../person_space_introduce/[mid]/page.js | 13 ++- app/{doc => webView}/[src]/page.js | 9 +- components/PaySpacePost/index.js | 37 +++++++-- components/Photos/index.js | 29 +++++-- components/WithAuth/index.js | 28 +++++-- utils/require.js | 19 +++-- utils/storeInfo.js | 11 ++- 12 files changed, 181 insertions(+), 78 deletions(-) rename app/{doc => webView}/[src]/page.js (78%) diff --git a/app/globals.css b/app/globals.css index f9f8416..9112745 100644 --- a/app/globals.css +++ b/app/globals.css @@ -150,7 +150,7 @@ body{ height:32px; } .adm-image-viewer-slides .adm-image-viewer-slide{ - margin-right: 0; + /* margin-right: 0; */ } .videoMask{ @@ -233,4 +233,8 @@ body{ height: max-content; width: max-content; border-radius: 0.25rem; +} + +.photos-bodyBox{ + width: 100vw; } \ No newline at end of file diff --git a/app/login/page.js b/app/login/page.js index 3536bb3..8f01931 100644 --- a/app/login/page.js +++ b/app/login/page.js @@ -365,14 +365,14 @@ const LoginBtn = ({ loginInfo, setLoginInfo, type, handleSubmit }) => { 我已阅读并同意 router.push(`/doc/useragreement`)} + onClick={() => router.push(`webView/${encodeURIComponent("/doc/useragreement")}`)} className="text-[#FF669E] text-xs" > 《用户协议》 router.push(`/doc/useragreement`)} + onClick={() => router.push(`webView/${encodeURIComponent("/doc/privatypolicy")}`)} className="text-[#FF669E] text-xs" > 《隐私政策》 diff --git a/app/my/setting/aboutUs/page.js b/app/my/setting/aboutUs/page.js index b6eb79b..840b866 100644 --- a/app/my/setting/aboutUs/page.js +++ b/app/my/setting/aboutUs/page.js @@ -39,7 +39,7 @@ export default function AboutUs() {
  • router.push(`/doc/useragreement`)} + onClick={() => router.push(`webView/${encodeURIComponent("/doc/useragreement")}`)} >
  • router.push(`/doc/privatypolicy`)} + onClick={() => router.push(`webView/${encodeURIComponent("/doc/privatypolicy")}`)} >
    {}, []); + useEffect(() => { + getData() + }, []); + const getData = async () => { + try { + //获取账号基本信息 + const data = + await require("POST", "/api/account/list_by_mid", null, true); + if (data.ret === -1) { + Toast.show({ + icon: "fail", + content: data.msg, + position: "top", + }); + return; + } + save("account", data.data.account); + setData(data.data.account); + } catch (error) { + console.error(error); + } + }; return (
    @@ -41,7 +69,7 @@ export default function Wallet() { width={48} height={48} /> -

    0

    +

    {data?.gold_num || 0}

    金币

    -

    0

    +

    {data?.diamond_num || 0}

    钻石

    - // navigation.navigate("WebWithHeader", { - // title: "充值中心", - // uri: process.env.EXPO_PUBLIC_WEB_URL + "/pay", - // }) - // } + onClick={() => + // navigation.navigate("WebWithHeader", { + // title: "充值中心", + // uri: process.env.EXPO_PUBLIC_WEB_URL + "/pay", + // }) + + router.replace( + process.env.NEXT_PUBLIC_WEB_URL + + "/pay?base=" + + encodeURIComponent(JSON.stringify(base)) + ) + } className="flex justify-between items-center py-4 w-full" >
    @@ -81,13 +115,10 @@ export default function Wallet() { 充值
    - +
    + // onClick={() => // navigation.navigate("WebWithHeader", { // title: "收支明细", // uri: process.env.EXPO_PUBLIC_WEB_URL + "/bill/recharge", @@ -110,17 +141,14 @@ export default function Wallet() { 收支明细
    - +
    - // Linking.openURL( - // `${process.env.EXPO_PUBLIC_WEB_URL}/withdrawal?mid=${data?.mid}&mobile_phone=${tokenAndMobilePhone?.mobile_phone}&token=${tokenAndMobilePhone?.token}` - // ) - // } + onClick={() => + router.replace( + `/webView/${encodeURIComponent(`withdrawal?mid=${data?.mid}&mobile_phone=${mobilePhone}&token=${temToken}`)}` + ) + } className="flex justify-between items-center py-4" >
    @@ -134,10 +162,7 @@ export default function Wallet() { 提现
    - +
    diff --git a/app/space/[id]/page.js b/app/space/[id]/page.js index d9ad8bc..ad7f26f 100644 --- a/app/space/[id]/page.js +++ b/app/space/[id]/page.js @@ -22,6 +22,7 @@ import AddWeChat from "@/components/AddWeChat"; import SeeTiefen from "@/components/SeeTiefen"; import DefaultMask from "@/components/DefaultMask"; import { getSpaceData, getStreamerInfo } from "@/api/space"; +import baseRequest from "@/utils/baseRequest"; const anchors = [ window.innerHeight - 280, window.innerHeight - 280, @@ -29,6 +30,7 @@ const anchors = [ ]; export default function PersonSpace() { + const base = baseRequest(); const router = useRouter(); const { id } = useParams(); const contentBox = useRef(); @@ -192,7 +194,8 @@ export default function PersonSpace() { ct: streamerInfo?.streamer_ext?.ct, user_id: streamerInfo?.streamer_ext?.user_id, name: streamerInfo?.streamer_ext?.name, - avatar: streamerInfo?.streamer_ext?.cover?.images[0]?.urls[0], + avatar: + streamerInfo?.streamer_ext?.cover?.images[0]?.urls[0], }) ) ) @@ -305,7 +308,16 @@ export default function PersonSpace() { onClick={() => { streamerInfo?.is_superfanship_unlocked === 1 ? setCurrentKey("chaofen") - : router.push("/pay"); + : router.push( + "/webView/" + + encodeURIComponent( + "/zone/pay/" + + data?.id + + "/h5_zone_superfanship/0" + + "?base=" + + encodeURIComponent(base) + ) + ); }} >
    diff --git a/app/space/person_space_introduce/[mid]/page.js b/app/space/person_space_introduce/[mid]/page.js index be6cbac..bd8412a 100644 --- a/app/space/person_space_introduce/[mid]/page.js +++ b/app/space/person_space_introduce/[mid]/page.js @@ -12,7 +12,9 @@ import { } from "@fortawesome/free-solid-svg-icons"; import AddWeChat from "@/components/AddWeChat"; import { getStreamerInfo } from "@/api/space"; +import baseRequest from "@/utils/baseRequest"; export default function PersonSpaceIntroduce() { + const base = baseRequest(); const router = useRouter(); const contentBox = useRef(); // 获取屏幕高度 @@ -294,9 +296,14 @@ export default function PersonSpaceIntroduce() { // router.push("/pay"); router.push( process.env.NEXT_PUBLIC_WEB_URL + - "/zone/pay/" + - data?.id + - "/h5_zone_admission/0" + "/webView/" + + encodeURIComponent( + "/zone/pay/" + + data?.id + + "/h5_zone_admission/0" + + "?base=" + + encodeURIComponent(base) + ) ); } }} diff --git a/app/doc/[src]/page.js b/app/webView/[src]/page.js similarity index 78% rename from app/doc/[src]/page.js rename to app/webView/[src]/page.js index 85f425f..ed7c3c7 100644 --- a/app/doc/[src]/page.js +++ b/app/webView/[src]/page.js @@ -3,9 +3,7 @@ import React from "react"; import { useRouter, useParams } from "next/navigation"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -import { - faAngleLeft, -} from "@fortawesome/free-solid-svg-icons"; +import { faAngleLeft } from "@fortawesome/free-solid-svg-icons"; export default function PersonSpace() { const { src } = useParams(); const router = useRouter(); @@ -24,7 +22,10 @@ export default function PersonSpace() {

    {/* 内容 */} -