Invalid vue addRouters refresh problem

read all over the Internet, none of those shared is valid!
the default front end only writes the following routes, and the rest is given to the data by the back end, and then addRouters.

 {
    path: "/login",
    name: "login",
    meta: {
      title: "Login - ",
      hideInMenu: true
    },
    component: () => import("@/view/login/login.vue")
  },
  {
    path: "/",
    name: "root",
    redirect: "/home",
    component: Main,
    meta: {
      title: "",
      hideInMenu: true,
      notCache: true
    },
    children: [
      {
        path: "/home",
        name: "home",
        meta: {
          title: "",
          hideInMenu: true,
          notCache: true
        },
        component: () => import("@/view/single-page/home")
      }
    ]
  },

after logging in, addRouters:

  let resultRoute = makeRoute(target[0].children)

          this.$router.options.routes.push(...resultRoute)
          this.$router.addRoutes(resultRoute)

however, except that the default / home can be refreshed. Other addresses, refresh, are stuck on the page, no response.

clipboard.png


router

clipboard.png

everything. I"m speechless. Pray for the great god.


self-question and answer:

//  : 
if (store.state.user.token) {
  let resultRoute = makeRoute(store.state.app.menuAuthList[0].children)
  router.options.routes.push(...resultRoute)
  router.addRoutes(resultRoute)
}

router.beforeEach((to, from, next) => {}
Menu