关闭无效通知提示

This commit is contained in:
al 2025-01-21 17:06:38 +08:00
parent ed00fd101b
commit 9ef744a6b9
1 changed files with 30 additions and 35 deletions

View File

@ -21,9 +21,6 @@ function BottomNav({ changeNoticeCount, changeInviter, noticeCount }) {
// console.log("Current Inviter: " + currentInviter);
changeInviter(currentInviter);
}
setTimeout(() => {
handleGetWebsocketData();
}, 2000);
}, [pathname]);
useEffect(() => {
const getDtata = async () => {
@ -107,39 +104,37 @@ function BottomNav({ changeNoticeCount, changeInviter, noticeCount }) {
return isActive;
};
const handleGetWebsocketData = (data) => {
// if (data.d.unread_cnt > 0) {
// changeNoticeCount(data.d.unread_cnt);
// const { n_type, title } = data.d.notif;
const n_type = 0;
const title = "系统通知的更好打开撒服务";
Toast.show({
type: "info",
maskClassName: "notice-toast",
content: (
<div className="flex items-center gap-2">
<OwnImage
outClassName="w-[42px] h-[42px]"
className="w-[42px] h-[42px]"
src="/images/notice.png"
/>
<div>
<p className="text-base">{`收到一条${
n_type === 0
? "系统"
: n_type === 1
? "审核"
: n_type === 2
? "付费"
: "活动"
}通知`}</p>
<p className="text-sm text-[#ffffff80]">{title}</p>
if (data.d.unread_cnt > 0) {
changeNoticeCount(data.d.unread_cnt);
const { n_type, title } = data.d.notif;
Toast.show({
type: "info",
maskClassName: "notice-toast",
content: (
<div className="flex items-center gap-2">
<OwnImage
outClassName="w-[42px] h-[42px]"
className="w-[42px] h-[42px]"
src="/images/notice.png"
/>
<div>
<p className="text-base">{`收到一条${
n_type === 0
? "系统"
: n_type === 1
? "审核"
: n_type === 2
? "付费"
: "活动"
}通知`}</p>
<p className="text-sm text-[#ffffff80]">{title}</p>
</div>
</div>
</div>
),
position: "top",
duration: 1000000,
});
// }
),
position: "top",
duration: 1000000,
});
}
};
return (
<>