解决偶发报错

This commit is contained in:
al 2024-12-27 18:38:46 +08:00
parent bd7469f7fa
commit 3dc7204f8c
2 changed files with 4 additions and 1 deletions

View File

@ -23,7 +23,7 @@ export default function Reviewed({ currentIndex }) {
const account = get("account");
try {
const body = {
b_mid: account.mid,
b_mid: account?.mid,
audit_type: 1,
offset: offset,
limit: 10,

View File

@ -53,6 +53,7 @@ const MessageList = ({ mid, changeNoticeCount, refInstance, noticeCount }) => {
]);
useImperativeHandle(refInstance, () => ({
readAllMsg: async (types) => {
if (!data.session_id) return;
try {
const body = {
n_types: types,
@ -68,6 +69,7 @@ const MessageList = ({ mid, changeNoticeCount, refInstance, noticeCount }) => {
});
return;
}
const _data2 = await requireAPI(
"POST",
"/api/contact_customer_service/read_all",
@ -83,6 +85,7 @@ const MessageList = ({ mid, changeNoticeCount, refInstance, noticeCount }) => {
});
return;
}
changeNoticeCount(0);
} catch (error) {
console.error(error);