解决偶发报错
This commit is contained in:
parent
bd7469f7fa
commit
3dc7204f8c
|
@ -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,
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue