How to use the menu data obtained by the interface in iview-admin to write to routers.js

export const loginRouter= {

path: "-sharplogin",
name: "login",
meta: {
  title: "Login - ",
  hideInMenu: true
},
component: () => import("@/view/login/login.vue")

};

export const indexRouter = {

path: "/",
name: "_home",
redirect: "/home",
component: Main,
meta: {
  hideInMenu: true,
  notCache: true
},

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

};
export const otherRouter = {
path:"/",
name:"_ home",
redirect:"/ home",
component: Main,
meta: {

hideInMenu: true,
notCache: true

},
children: [

]
{
  path: "home",
  name: "home",
  meta: {
    hideInMenu: true,
    title: "",
    notCache: true
  },
  component: () => import("@/view/single-page/home")
}

]
};

export const page401 = {

path: "/401",
name: "error_401",
meta: {
  hideInMenu: true
},
component: () => import("@/view/error-page/401.vue")

};
export const page500 = {

path: "/500",
name: "error_500",
meta: {
  hideInMenu: true
},
component: () => import("@/view/error-page/500.vue")

};
export const page404 = {
path:"*",
name: "error_404",
meta: {

hideInMenu: true

},
component: () = > import ("@ / view/error-page/404.vue")
};

export const routers = [
loginRouter,
indexRouter,
page401,
page500,
page404,

];
routerJurisdiction (). Then ((rel) = > {
for (var iTun0; I < rel.data.data.length;iPP) {

routers.push(
  {
    path: "-sharp"+rel.data.data[i].f_code,
    name: rel.data.data[i].f_code,
    meta: {
      hide: true
    },
    component: Main,
    children:[
      {
        path: rel.data.data[i].f_code+"_page",
        name: rel.data.data[i].f_code+"_page",
        meta:{
          icon: rel.data.data[i].f_icon,
          title: rel.data.data[i].f_name,
        },
        component: () => import(rel.data.data[i].f_url)
      }
    ]
  },
);

}

});

export default routers

write this way, what I read appears in the menu, but after clicking on it, there is such a problem in Route with name "company_page" does not exist,. Please ask Daniel, how to solve it?

Aug.25,2021

pay attention to this sentence, the packaging process does not know where your resources are

component: () => import(rel.data.data[i].f_url)

Boss, how does routerJurisdiction work?

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bf687c-32013.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bf687c-32013.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?