Merge remote-tracking branch 'origin/main' into anln_2.1

This commit is contained in:
al 2025-03-10 17:46:43 +08:00
parent 6f6ec99ce2
commit d5a0637bab
8 changed files with 109 additions and 11 deletions

View File

@ -200,7 +200,7 @@ const MessageList = ({ mid, changeNoticeCount, refInstance, noticeCount }) => {
<Badge
status="error"
content={count > 99 ? "99+" : count}
className="text-lg"
className="text-lg min-w-[14px] flex justify-center items-center"
/>
</div>
)}
@ -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"
/>
</div>
)}

View File

@ -88,11 +88,6 @@ export default function NoticeItem({ leftIcon, hasLink, data }) {
{hasLink.text}
</span>
<div>
{/* <FontAwesomeIcon
icon={faAngleRight}
style={{ maxWidth: "12px" }}
size="xl"
/> */}
<OwnIcon
src="/icons/32DP/angleRight.png"
className="w-[20px] h-[20px]"

View File

@ -45,6 +45,9 @@ export default function PersonSpace() {
const [currentTime, setCurrentTime] = useState();
const scrollRef = useRef(null);
const [createPostMask, setCreatePostMask] = useState(false);
const [popVisible, setPopVisible] = useState(false);
// 通知弹框数据
const [noticesMaskInformation, setNoticesMaskInformation] = useState(false);
//退款中Modal是否展示
const [isRefundingModalVisible, setIsRefundingModalVisible] = useState(false);
const ironFanProgress = useMemo(
@ -55,6 +58,8 @@ export default function PersonSpace() {
[streamerInfo]
);
useEffect(() => {
// 通知弹窗信息
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() {
取消
</p>
</Popup>
<Popup
className="z-[9999!important]"
closeOnSwipe={true}
visible={popVisible}
onMaskClick={() => {
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} */}
<div className="w-full -mt-[46px]">
<OwnImage
className="w-full h-[160px]"
outClassName="w-full h-[160px]"
fit="cover"
src={process.env.NEXT_PUBLIC_WEB_ASSETS_URL + "/images/newM.png"}
/>
<div className="p-[14px] w-full flex justify-center items-center flex-col">
<p className="text-[#FFFFFFB2] text-[13px] text-center mb-[28px]">
{noticesMaskInformation.content}
</p>
<div className="w-full">
{noticesMaskInformation.action?.map((item, index) => {
return (
<div
key={index}
style={{ display: item.count > 0 ? "flex" : "none" }}
className="w-full h-[56px] p-[14px] rounded-[12px] bg-[#2F2E32] flex justify-between items-center mt-[10px]"
>
<div className="flex items-center">
<OwnIcon
src={item?.icon_url}
className="w-[28px] h-[28px]"
outClassName="w-[28px] h-[28px] mr-[3.5px]"
/>
<span>
{item.text} {item.count}
</span>
</div>
<div
onClick={() => router.push(item.h5_url)}
className="py-[5px] px-[12px] rounded-full text-[13px] font-bold bg-[#FF669E]"
>
前往处理
</div>
</div>
);
})}
</div>
<div
onClick={() => setPopVisible(false)}
className="w-[221px] h-[46px] mt-[41px] flex justify-center items-center rounded-full text-[15px] bg-[#FF669E]"
>
回到空间
</div>
</div>
</div>
</Popup>
</div>
);
}

View File

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

View File

@ -74,7 +74,7 @@ function BottomNav({ changeNoticeCount, changeInviter, noticeCount }) {
{!!noticeCount && (
<Badge
content={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"
/>
)}
</div>
@ -85,7 +85,7 @@ function BottomNav({ changeNoticeCount, changeInviter, noticeCount }) {
{!!noticeCount && (
<Badge
content={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"
/>
)}
</div>

BIN
public/icons/newM_pay.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 960 B

BIN
public/images/newM.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB