JiuMuMesParent/moduleService/DeviceInteractionModule/src/main/java/com/mes/md/service/impl/AccountServiceImpl.java
@@ -72,7 +72,6 @@ accountRole.put("account",frist.get("account").toString()); accountRole.put("role_id",frist.get("role_id").toString()); for (Map<String,Object> item:username){ if(keyMenus.contains(item.get("menu_id").toString())){ //存在此菜单 int index=keyMenus.indexOf(item.get("menu_id").toString()); @@ -90,8 +89,9 @@ thisMenu.put("pages",thisPages); thisMenus.set(index,thisMenu); accountRole.put("menus",thisMenus); }else if(keyMenus.size()>0){ }else if(keyMenus.size()>0&&!keyMenus.contains(item.get("menu_id").toString())){ //不存在此菜单 keyMenus.add(item.get("menu_id").toString()); List<Map<String, Object>> thisMenus= (List<Map<String, Object>>) accountRole.get("menus"); Map<String, Object> thisMenu=new HashMap<>(); thisMenu.put("menu_id",item.get("menu_id")); JiuMuMesParent/moduleService/DeviceInteractionModule/src/test/java/com/mes/DeviceInteractionModuleApplicationTest.java
@@ -36,7 +36,7 @@ } @Test public void testFindAccount() { Map<String, Object> Account=accountService.selectAccount("admin","12345"); Map<String, Object> Account=accountService.selectAccount("beibo","57858555"); if(Account.isEmpty()){ System.out.println("成功"); } UI-Project/src/layout/MainErpView.vue
@@ -36,7 +36,7 @@ if (storedData) { userData.value = JSON.parse(storedData); console.log(111); // 打印 menus 数组 console.log(userData.value); // 打印 menus 数组 console.log(userData.value.menus); // 打印 menus 数组 } else { console.log('No data found in localStorage.'); }