解决偶发报错
This commit is contained in:
parent
bd7469f7fa
commit
3dc7204f8c
|
@ -23,7 +23,7 @@ export default function Reviewed({ currentIndex }) {
|
||||||
const account = get("account");
|
const account = get("account");
|
||||||
try {
|
try {
|
||||||
const body = {
|
const body = {
|
||||||
b_mid: account.mid,
|
b_mid: account?.mid,
|
||||||
audit_type: 1,
|
audit_type: 1,
|
||||||
offset: offset,
|
offset: offset,
|
||||||
limit: 10,
|
limit: 10,
|
||||||
|
|
|
@ -53,6 +53,7 @@ const MessageList = ({ mid, changeNoticeCount, refInstance, noticeCount }) => {
|
||||||
]);
|
]);
|
||||||
useImperativeHandle(refInstance, () => ({
|
useImperativeHandle(refInstance, () => ({
|
||||||
readAllMsg: async (types) => {
|
readAllMsg: async (types) => {
|
||||||
|
if (!data.session_id) return;
|
||||||
try {
|
try {
|
||||||
const body = {
|
const body = {
|
||||||
n_types: types,
|
n_types: types,
|
||||||
|
@ -68,6 +69,7 @@ const MessageList = ({ mid, changeNoticeCount, refInstance, noticeCount }) => {
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const _data2 = await requireAPI(
|
const _data2 = await requireAPI(
|
||||||
"POST",
|
"POST",
|
||||||
"/api/contact_customer_service/read_all",
|
"/api/contact_customer_service/read_all",
|
||||||
|
@ -83,6 +85,7 @@ const MessageList = ({ mid, changeNoticeCount, refInstance, noticeCount }) => {
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
changeNoticeCount(0);
|
changeNoticeCount(0);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
|
|
Loading…
Reference in New Issue