Infinitely calling ajax cannot be solved in dva framework

just came into contact with the dva framework. I judged in subscriptions that when the current route is entered, it should not be called only once.
`subscriptions: {

getPageData({ dispatch, history }) {
  return history.listen(({ pathname, query }) => {
    if (pathname === "/invite-friends") {
      dispatch({ type: "getActivityDetail" });
    }
  });
}

}, `

Mar.02,2021

subsciptions listens for routes in history.listen .
if there is a change in the route, it will certainly be executed.
your code can only show that router is constantly refreshing routes for / invite-friends .

Menu