|
@@ -35,7 +35,9 @@ export default () => {
|
|
|
};
|
|
};
|
|
|
const { list, loadMore, mutate } = useLoadMoreInfinite<TVisitorAgent[]>(
|
|
const { list, loadMore, mutate } = useLoadMoreInfinite<TVisitorAgent[]>(
|
|
|
createKey(`getVisitorList ${currentAgent?.agentId}`, 20, [currentAgent?.agentId]),
|
|
createKey(`getVisitorList ${currentAgent?.agentId}`, 20, [currentAgent?.agentId]),
|
|
|
- fetcher);
|
|
|
|
|
|
|
+ fetcher, {
|
|
|
|
|
+ revalidateOnMount: false
|
|
|
|
|
+ });
|
|
|
|
|
|
|
|
|
|
|
|
|
// 统计数据
|
|
// 统计数据
|
|
@@ -48,16 +50,18 @@ export default () => {
|
|
|
|
|
|
|
|
const fetchInitData = async () => {
|
|
const fetchInitData = async () => {
|
|
|
await fetchAgents();
|
|
await fetchAgents();
|
|
|
- fetchSummary()
|
|
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ useEffect(()=> {
|
|
|
|
|
+ fetchInitData();
|
|
|
|
|
+ }, [])
|
|
|
|
|
+
|
|
|
useEffect(() => {
|
|
useEffect(() => {
|
|
|
fetchSummary()
|
|
fetchSummary()
|
|
|
|
|
+ mutate()
|
|
|
}, [currentAgent])
|
|
}, [currentAgent])
|
|
|
|
|
|
|
|
useDidShow(()=> {
|
|
useDidShow(()=> {
|
|
|
- fetchInitData()
|
|
|
|
|
mutate()
|
|
mutate()
|
|
|
})
|
|
})
|
|
|
|
|
|
|
@@ -65,6 +69,7 @@ export default () => {
|
|
|
// 登录完成后
|
|
// 登录完成后
|
|
|
const onLoginEnd = ()=> {
|
|
const onLoginEnd = ()=> {
|
|
|
fetchInitData()
|
|
fetchInitData()
|
|
|
|
|
+ fetchSummary()
|
|
|
mutate()
|
|
mutate()
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -74,10 +79,6 @@ export default () => {
|
|
|
loadMore()
|
|
loadMore()
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
- useDidShow(()=> {
|
|
|
|
|
- mutate()
|
|
|
|
|
- })
|
|
|
|
|
-
|
|
|
|
|
const unprocessedDislikeCnt = summary?.unprocessedDislikeCnt ?? 0
|
|
const unprocessedDislikeCnt = summary?.unprocessedDislikeCnt ?? 0
|
|
|
|
|
|
|
|
if(!agents) {
|
|
if(!agents) {
|