From 7fc60685df2582529a7114a6a75e156094611207 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E9=99=8C?= Date: Tue, 13 Jun 2023 19:03:31 +0800 Subject: [PATCH] no message --- src/api/model/system.js | 17 +---- src/router/index.js | 2 +- src/views/login/components/passwordForm.vue | 38 ++++------ src/views/login/index.vue | 84 ++++++++++++++++++--- 4 files changed, 93 insertions(+), 48 deletions(-) diff --git a/src/api/model/system.js b/src/api/model/system.js index fc3d320..287fa00 100644 --- a/src/api/model/system.js +++ b/src/api/model/system.js @@ -1,19 +1,8 @@ import http from "@/utils/request" export default { - menu: { - myMenus: { - url: `/system/menu/my`, - name: "获取我的菜单", - get: async function() { - return await http.get(this.url); - } - }, - list: { - url: `/system/menu/lists`, - name: "获取菜单", - get: async function() { - return await http.get(this.url); - } + index: { + get: async function() { + return await http.get('/system/index'); } }, dic: { diff --git a/src/router/index.js b/src/router/index.js index 77285d5..cad56db 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -65,7 +65,7 @@ router.beforeEach(async (to, from, next) => { //加载动态/静态路由 if (!isGetRouter) { // 重新获取菜单路 - api.system.menu.myMenus.get().then((response) => { + api.system.index.get().then((response) => { tool.data.set("menu", response.data.menu) tool.data.set("userinfo", response.data.user) tool.data.set("permissions", response.data.permissions) diff --git a/src/views/login/components/passwordForm.vue b/src/views/login/components/passwordForm.vue index ec7d452..274a3f7 100644 --- a/src/views/login/components/passwordForm.vue +++ b/src/views/login/components/passwordForm.vue @@ -1,7 +1,7 @@