|
@ -402,8 +402,21 @@ function fnAddDynamicMenuRoutes(menuList = [], routes = []) { |
|
|
eval(s2) |
|
|
eval(s2) |
|
|
); // URL支持{{ window.xxx }}占位符变量
|
|
|
); // URL支持{{ window.xxx }}占位符变量
|
|
|
if (isURL(URL)) { |
|
|
if (isURL(URL)) { |
|
|
route["path"] = route["name"] = `i-${menuList[i].id}`; |
|
|
if (menuList[i].children && menuList[i].children.length >= 1) { |
|
|
route["meta"]["iframeURL"] = URL; |
|
|
let item = menuList[i].children.find( |
|
|
|
|
|
(subMenu) => subMenu.url == menuList[i].url |
|
|
|
|
|
); |
|
|
|
|
|
if (item) { |
|
|
|
|
|
route["path"] = route["name"] = `i-${menuList[i].id}`; |
|
|
|
|
|
route["redirect"] = `i-${item.id}`; |
|
|
|
|
|
} else { |
|
|
|
|
|
route["path"] = route["name"] = `i-${menuList[i].id}`; |
|
|
|
|
|
route["meta"]["iframeURL"] = URL; |
|
|
|
|
|
} |
|
|
|
|
|
} else { |
|
|
|
|
|
route["path"] = route["name"] = `i-${menuList[i].id}`; |
|
|
|
|
|
route["meta"]["iframeURL"] = URL; |
|
|
|
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
URL = URL.replace(/^\//, "").replace(/_/g, "-"); |
|
|
URL = URL.replace(/^\//, "").replace(/_/g, "-"); |
|
|
if (URL.startsWith("unopen")) { |
|
|
if (URL.startsWith("unopen")) { |
|
|