diff --git a/app/login/page.js b/app/login/page.js index acdada0..2c583be 100644 --- a/app/login/page.js +++ b/app/login/page.js @@ -52,7 +52,7 @@ function Login({ handleLogin }) { const showMobal = useRef(); const [iframePageUrl, setIframePageUrl] = useState(null); useEffect(() => { - const userAgent = navigator.userAgent; + const userAgent = window && window.navigator?.userAgent; //区分设备类型 if (/Android/i.test(userAgent)) { setDeviceType("Android"); diff --git a/app/my/page.js b/app/my/page.js index e614305..7fb248e 100644 --- a/app/my/page.js +++ b/app/my/page.js @@ -5,7 +5,7 @@ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { faAngleRight } from "@fortawesome/free-solid-svg-icons"; import { Avatar, Toast, Space } from "antd-mobile"; import { useRouter } from "next/navigation"; -import { get } from "@/utils/storeInfo"; +import { get, save } from "@/utils/storeInfo"; import requireAPI from "@/utils/requireAPI"; import OwnIcon from "@/components/OwnIcon"; import OwnImage from "@/components/OwnImage"; @@ -65,6 +65,7 @@ const My = () => { }); return; } + save("account", account.data.account); const statuses = await requireAPI( "POST", "/api/streamer_auth_approval/get_statuses", @@ -118,13 +119,13 @@ const My = () => { subTitle: account.data.account.role == 3 ? "创作者功能" : "完善资料后解锁", }, - // { - // url: `my/refund/refundList`, - // iconUrl: "/icons/32DP/wallet.png", - // title: "退款审核", - // subTitle: - // account.data.account.role == 3 ? "创作者功能" : "完善资料后解锁", - // }, + { + url: `my/refund/refundList`, + iconUrl: "/icons/32DP/refund.png", + title: "退款审核", + subTitle: + account.data.account.role == 3 ? "创作者功能" : "完善资料后解锁", + }, // ...currentOld, ]; if (isInJoinProgress) { diff --git a/app/my/refund/refundDetail/[id]/page.jsx b/app/my/refund/refundDetail/[id]/page.jsx index 7145d56..486a7d5 100644 --- a/app/my/refund/refundDetail/[id]/page.jsx +++ b/app/my/refund/refundDetail/[id]/page.jsx @@ -142,7 +142,11 @@ export default function RefundDetail() {
@@ -216,7 +220,9 @@ export default function RefundDetail() { }} > {data && data?.refunds_status === 4 - ? "系统已自动提交" + ? "超时自动提交" + : data && data?.refunds_status === 3 + ? "2小时无条件退款" : !checkAble ? "您已提交" : isLoading diff --git a/app/my/refund/refundList/components/Reviewed/index.jsx b/app/my/refund/refundList/components/Reviewed/index.jsx index c647efc..d7e418a 100644 --- a/app/my/refund/refundList/components/Reviewed/index.jsx +++ b/app/my/refund/refundList/components/Reviewed/index.jsx @@ -66,7 +66,7 @@ export default function PendingReview({ currentIndex }) { roundedFull />
-
+
{item.account.name} @@ -99,9 +99,9 @@ export default function PendingReview({ currentIndex }) {
-
+
- + {item?.refunds_status === 4 ? "已自动退款" : item?.refunds_status === -1 diff --git a/app/my/streamerVerification/joinGuild/page.jsx b/app/my/streamerVerification/joinGuild/page.jsx index 994f7df..fbf3a05 100644 --- a/app/my/streamerVerification/joinGuild/page.jsx +++ b/app/my/streamerVerification/joinGuild/page.jsx @@ -136,6 +136,7 @@ export default function JoinGuild() {
@@ -155,6 +156,7 @@ export default function JoinGuild() {
diff --git a/app/my/streamerVerification/joinStreamer/page.jsx b/app/my/streamerVerification/joinStreamer/page.jsx index 04dcf9a..d36cdcf 100644 --- a/app/my/streamerVerification/joinStreamer/page.jsx +++ b/app/my/streamerVerification/joinStreamer/page.jsx @@ -128,6 +128,7 @@ export default function JoinStreamer() { setFormData((old) => ({ ...old, name: value })) @@ -168,6 +169,7 @@ export default function JoinStreamer() { setFormData((old) => ({ ...old, contact: value })) diff --git a/app/noticeDetail/components/NoticeItem/index.jsx b/app/noticeDetail/components/NoticeItem/index.jsx index 8c8b5ad..c6e5a34 100644 --- a/app/noticeDetail/components/NoticeItem/index.jsx +++ b/app/noticeDetail/components/NoticeItem/index.jsx @@ -63,7 +63,7 @@ export default function NoticeItem({ leftIcon, hasLink, data }) { // } if (links.length > 1) { links[1]?.action === "app_router_path"; - router.push(links[1]?.params); + router.push("/" + links[1]?.params); } else { links[0]?.action === "outward"; router.push(links[0]?.params); diff --git a/app/search/conponents/Banner/index.jsx b/app/search/conponents/Banner/index.jsx new file mode 100644 index 0000000..d6e8244 --- /dev/null +++ b/app/search/conponents/Banner/index.jsx @@ -0,0 +1,81 @@ +import React, { useEffect, useState, useRef, useCallback } from "react"; +import { Toast, Swiper, Image } from "antd-mobile"; +import LoadingMask from "@/components/LoadingMask"; +import { useRouter } from "next/navigation"; +import requireAPI from "@/utils/requireAPI"; +import OwnImage from "@/components/OwnImage"; +import { goToPage } from "@/utils/tools"; +export default function Banner() { + const [bannerList, setBannerList] = useState([]); + const [isLoading, setIsLoading] = useState(false); + const router = useRouter(); + const ref = useRef(null); + useEffect(() => { + const getBannerList = async () => { + setIsLoading(true); + try { + const _data = await requireAPI( + "POST", + "/api/activity_banner/list", + null, + true + ); + if (_data.ret === -1) { + Toast.show({ + icon: "fail", + content: _data.msg, + position: "top", + }); + return; + } + setBannerList(_data.data.list); + } catch (error) { + console.error(error); + } finally { + setIsLoading(false); + } + }; + getBannerList(); + }, []); + const items = useCallback( + (item, index) => ( + +
{ + const links = item?.hyperlinks; + if (links.length > 1) { + router.push( + links.filter((it) => it.inward_action_type === "h5")[0]?.url + ); + } else { + router.push(links[0]?.url); + } + }} + > + +
+
+ ), + [] + ); + return ( +
+ + {bannerList.map((item, index) => items(item, index))} + +
+ ); +} diff --git a/app/search/conponents/HostList/index.jsx b/app/search/conponents/HostList/index.jsx index 7892663..a41d606 100644 --- a/app/search/conponents/HostList/index.jsx +++ b/app/search/conponents/HostList/index.jsx @@ -5,6 +5,7 @@ import { useRouter } from "next/navigation"; import requireAPI from "@/utils/requireAPI"; import OwnImage from "@/components/OwnImage"; import OwnIcon from "@/components/OwnIcon"; +import Banner from "../Banner"; export default function HostList() { const [hostList, setHostList] = useState([]); const [isLoading, setIsLoading] = useState(false); @@ -38,6 +39,10 @@ export default function HostList() { }, []); return (
+ {/* Banner预留位置 */} +
+ +

猜你想看

{/*
- router.push(`space/person_space_introduce/${item.mid}`) - } + onClick={() => { + const links = item?.hyperlinks; + if (links.length > 1) { + router.push( + links.filter((it) => it.inward_action_type === "h5")[0]?.url + ); + } else { + router.push(links[0]?.url); + } + }} className="grid grid-cols-[48px,calc(100vw-48px-2rem)]" >
@@ -90,34 +102,37 @@ export default function HostList() { {item.title} - -
- {item?.gender === 1 ? ( - - ) : ( - - )} - - {item.age} - -
-
- - - {item.city} - -
+ {item.age && ( + <> +
+ {item?.gender === 1 ? ( + + ) : ( + + )} + + {item.age} + +
+
+ + + {item.city} + +
+ + )}

{item.text} @@ -127,7 +142,6 @@ export default function HostList() { ))} - {/* Banner预留位置 */}

); } diff --git a/app/space/person_space_introduce/[mid]/page.js b/app/space/person_space_introduce/[mid]/page.js index cc9bf30..a1bd75d 100644 --- a/app/space/person_space_introduce/[mid]/page.js +++ b/app/space/person_space_introduce/[mid]/page.js @@ -175,6 +175,7 @@ export default function PersonSpaceIntroduce() { diff --git a/app/space/setting/spaceRefund/page.jsx b/app/space/setting/spaceRefund/page.jsx index 6c237ce..c9b7981 100644 --- a/app/space/setting/spaceRefund/page.jsx +++ b/app/space/setting/spaceRefund/page.jsx @@ -59,7 +59,7 @@ export default function SpaceRefund() { if (isSubmitting) return; setIsSubmitting(true); try { - const _data = await requireAPI("POST", "/api/zone/refund", { + const _data = await requireAPI("POST", "/api/zone/refund_v2", { body: { zid: Number(searchParams.get("id")), contact_name: name, @@ -166,6 +166,7 @@ export default function SpaceRefund() { 联系方式

setContact(value)} value={contact} @@ -184,6 +185,7 @@ export default function SpaceRefund() {