diff --git a/app/noticeDetail/components/MessageList/index.jsx b/app/noticeDetail/components/MessageList/index.jsx index 034181b..6fe1885 100644 --- a/app/noticeDetail/components/MessageList/index.jsx +++ b/app/noticeDetail/components/MessageList/index.jsx @@ -200,7 +200,7 @@ const MessageList = ({ mid, changeNoticeCount, refInstance, noticeCount }) => { 99 ? "99+" : count} - className="text-lg" + className="text-lg min-w-[14px] flex justify-center items-center" /> )} @@ -264,7 +264,7 @@ const MessageList = ({ mid, changeNoticeCount, refInstance, noticeCount }) => { content={ data.contact_cs_urc > 99 ? "99+" : data.contact_cs_urc } - className="text-lg" + className="text-lg min-w-[14px] flex justify-center items-center" /> )} diff --git a/app/noticeDetail/components/NoticeItem/index.jsx b/app/noticeDetail/components/NoticeItem/index.jsx index e6343a1..a8a294a 100644 --- a/app/noticeDetail/components/NoticeItem/index.jsx +++ b/app/noticeDetail/components/NoticeItem/index.jsx @@ -88,11 +88,6 @@ export default function NoticeItem({ leftIcon, hasLink, data }) { {hasLink.text}
- {/* */} { + // 通知弹窗信息 + getNoticesMaskInformation(); setScrollHeight(window.innerHeight - 126); if (contentBox.current) { contentBox.current.style.transform = "translateY(-12px)"; @@ -88,6 +93,9 @@ export default function PersonSpace() { firstRequest(currentKey); } }, [currentKey, streamerInfo]); + useEffect(() => { + setPopVisible(noticesMaskInformation?.enable); + }, [noticesMaskInformation]); const getCurrentTime = async () => { setCurrentTime(Math.floor(new Date().getTime() / 1000)); }; @@ -99,6 +107,28 @@ export default function PersonSpace() { // setHasMore(append.length > 0); } } + const getNoticesMaskInformation = async () => { + const userMid = base?.b_mid; + if (userMid != id) return; + try { + const data = await requireAPI("POST", "/api/zone/pop_up", { + body: { + mid: parseInt(id), + }, + }); + if (data.ret === -1) { + Toast.show({ + icon: "fail", + content: data.msg, + position: "top", + }); + return; + } + setNoticesMaskInformation(data.data); + } catch (error) { + // console.error(error); + } + }; const getPostList = async (zid, activeKey, offset) => { try { setLoading(true); @@ -583,6 +613,79 @@ export default function PersonSpace() { 取消

+ { + setPopVisible(false); + // setIframePageUrl(null); + }} + onClose={() => { + setPopVisible(false); + // setIframePageUrl(null); + }} + position="bottom" + bodyStyle={{ + height: "430px", + backgroundColor: "#17161A", + paddingBottom: 0, + borderTopRightRadius: "15px", + borderTopLeftRadius: "15px", + }} + style={{ + "--background-color": "#fff", + }} + > + {/* {iframePage} */} +
+ +
+

+ {noticesMaskInformation.content} +

+
+ {noticesMaskInformation.action?.map((item, index) => { + return ( +
0 ? "flex" : "none" }} + className="w-full h-[56px] p-[14px] rounded-[12px] bg-[#2F2E32] flex justify-between items-center mt-[10px]" + > +
+ + + {item.text} {item.count} + +
+
router.push(item.h5_url)} + className="py-[5px] px-[12px] rounded-full text-[13px] font-bold bg-[#FF669E]" + > + 前往处理 +
+
+ ); + })} +
+
setPopVisible(false)} + className="w-[221px] h-[46px] mt-[41px] flex justify-center items-center rounded-full text-[15px] bg-[#FF669E]" + > + 回到空间 +
+
+
+
); } diff --git a/app/space/page.js b/app/space/page.js index cbd04e5..96ddee3 100644 --- a/app/space/page.js +++ b/app/space/page.js @@ -178,11 +178,11 @@ const VisitingCard = ({ data }) => { }; const SpacesList = forwardRef(({ scrollHeight }, ref) => { + const router = useRouter(); const [loading, setLoading] = useState(false); const [hasMore, setHasMore] = useState(true); const [offset, setOffset] = useState(0); const [spacesList, setSpacesList] = useState([]); - const router = useRouter(); useEffect(() => { // getSpaceList(2).then((res) => { // setSpacesList(res); @@ -219,7 +219,7 @@ const SpacesList = forwardRef(({ scrollHeight }, ref) => { if (list.length == 0) { setHasMore(false); } - setSpacesList([...spacesList, ...list]); + setSpacesList((prev) => [...prev, ...list]); } const getSpaceList = async (type = 2) => { setLoading(true); diff --git a/components/BottomNav/index.js b/components/BottomNav/index.js index 33b4136..6a2f2a0 100644 --- a/components/BottomNav/index.js +++ b/components/BottomNav/index.js @@ -74,7 +74,7 @@ function BottomNav({ changeNoticeCount, changeInviter, noticeCount }) { {!!noticeCount && ( 99 ? "99+" : noticeCount} - className="absolute top-0 right-0 z-10" + className="absolute top-0 right-0 z-10 min-w-[14px] flex justify-center items-center" /> )} @@ -85,7 +85,7 @@ function BottomNav({ changeNoticeCount, changeInviter, noticeCount }) { {!!noticeCount && ( 99 ? "99+" : noticeCount} - className="absolute top-0 right-0 z-10" + className="absolute top-0 right-0 z-10 min-w-[14px] flex justify-center items-center" /> )} diff --git a/public/icons/newM_pay.png b/public/icons/newM_pay.png new file mode 100644 index 0000000..302fc84 Binary files /dev/null and b/public/icons/newM_pay.png differ diff --git a/public/icons/newM_wechat.png b/public/icons/newM_wechat.png new file mode 100644 index 0000000..5438d13 Binary files /dev/null and b/public/icons/newM_wechat.png differ diff --git a/public/images/newM.png b/public/images/newM.png new file mode 100644 index 0000000..3b8cc6b Binary files /dev/null and b/public/images/newM.png differ