更新通知icon
This commit is contained in:
parent
dc7f10ad82
commit
ed00fd101b
|
@ -411,4 +411,8 @@ textarea {
|
||||||
.ant-modal-mask,
|
.ant-modal-mask,
|
||||||
.ant-modal-wrap {
|
.ant-modal-wrap {
|
||||||
position: absolute !important;
|
position: absolute !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notice-toast .adm-toast-main{
|
||||||
|
background-color: rgb(23,22,26)!important;
|
||||||
}
|
}
|
|
@ -10,6 +10,7 @@ import { connect } from "react-redux";
|
||||||
import { get } from "@/utils/storeInfo";
|
import { get } from "@/utils/storeInfo";
|
||||||
import requireAPI from "@/utils/requireAPI";
|
import requireAPI from "@/utils/requireAPI";
|
||||||
import OwnIcon from "../OwnIcon";
|
import OwnIcon from "../OwnIcon";
|
||||||
|
import OwnImage from "../OwnImage";
|
||||||
function BottomNav({ changeNoticeCount, changeInviter, noticeCount }) {
|
function BottomNav({ changeNoticeCount, changeInviter, noticeCount }) {
|
||||||
const searchParams = useSearchParams();
|
const searchParams = useSearchParams();
|
||||||
const pathname = usePathname();
|
const pathname = usePathname();
|
||||||
|
@ -20,6 +21,9 @@ function BottomNav({ changeNoticeCount, changeInviter, noticeCount }) {
|
||||||
// console.log("Current Inviter: " + currentInviter);
|
// console.log("Current Inviter: " + currentInviter);
|
||||||
changeInviter(currentInviter);
|
changeInviter(currentInviter);
|
||||||
}
|
}
|
||||||
|
setTimeout(() => {
|
||||||
|
handleGetWebsocketData();
|
||||||
|
}, 2000);
|
||||||
}, [pathname]);
|
}, [pathname]);
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const getDtata = async () => {
|
const getDtata = async () => {
|
||||||
|
@ -103,15 +107,23 @@ function BottomNav({ changeNoticeCount, changeInviter, noticeCount }) {
|
||||||
return isActive;
|
return isActive;
|
||||||
};
|
};
|
||||||
const handleGetWebsocketData = (data) => {
|
const handleGetWebsocketData = (data) => {
|
||||||
if (data.d.unread_cnt > 0) {
|
// if (data.d.unread_cnt > 0) {
|
||||||
changeNoticeCount(data.d.unread_cnt);
|
// changeNoticeCount(data.d.unread_cnt);
|
||||||
const { n_type, title } = data.d.notif;
|
// const { n_type, title } = data.d.notif;
|
||||||
Toast.show({
|
const n_type = 0;
|
||||||
type: "info",
|
const title = "系统通知的更好打开撒服务";
|
||||||
maskClassName: "notice-toast",
|
Toast.show({
|
||||||
content: (
|
type: "info",
|
||||||
<div className="flex flex-col gap-2">
|
maskClassName: "notice-toast",
|
||||||
<p className="text-base">{`🔔 收到一条${
|
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 === 0
|
||||||
? "系统"
|
? "系统"
|
||||||
: n_type === 1
|
: n_type === 1
|
||||||
|
@ -122,11 +134,12 @@ function BottomNav({ changeNoticeCount, changeInviter, noticeCount }) {
|
||||||
}通知`}</p>
|
}通知`}</p>
|
||||||
<p className="text-sm text-[#ffffff80]">{title}</p>
|
<p className="text-sm text-[#ffffff80]">{title}</p>
|
||||||
</div>
|
</div>
|
||||||
),
|
</div>
|
||||||
position: "top",
|
),
|
||||||
duration: 5000,
|
position: "top",
|
||||||
});
|
duration: 1000000,
|
||||||
}
|
});
|
||||||
|
// }
|
||||||
};
|
};
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
Loading…
Reference in New Issue