前端更新

This commit is contained in:
橙子
2021-10-22 21:19:26 +08:00
parent 53aefeaedd
commit e229b32a5c
6 changed files with 130 additions and 100 deletions

View File

@@ -1,17 +1,24 @@
function getUrl(menuList, menuStr) {
for (var i = 0; i < menuList.length; i++) {
if (menuList[i].menu_name == menuStr) {
console.log(handUrl(menuList[i]))
return 1;
} else {
if (menuList[i].children != undefined) {
getUrl(menuList[i].children, menuStr);
}
var start = true;
function getUrl(menuList, menuStr) {
if (start) {
for (var i = 0; i < menuList.length; i++) {
if (menuList[i].menu_name == menuStr) {
alert(777)
start = false;
console.log(handUrl(menuList[i]))
return handUrl(menuList[i])
} else {
if (menuList[i].children != undefined && start) {
alert(666)
getUrl(menuList[i].children, menuStr);
}
}
}
}
}
};
function handUrl(menu) {
var axiosUrls = {
@@ -42,4 +49,8 @@ function handUrl(menu) {
});
return axiosUrls;
}
export default { getUrl }
export {
getUrl,
handUrl
}