微调
This commit is contained in:
@@ -12,12 +12,12 @@ export const loginApi = (params: Login.ReqLoginForm) => {
|
|||||||
}
|
}
|
||||||
// 获取菜单列表
|
// 获取菜单列表
|
||||||
export const getAuthMenuListApi = () => {
|
export const getAuthMenuListApi = () => {
|
||||||
return http.get<Menu.MenuOptions[]>(`${rePrefix}/menu/list`, {}, { loading: false })
|
return http.get<Menu.MenuOptions[]>(`/sysFunction/getMenu`, {}, { loading: false })
|
||||||
// return http.post<Menu.MenuOptions[]>(`/Register2`, {}, { loading: false })
|
// return http.post<Menu.MenuOptions[]>(`/Register2`, {}, { loading: false })
|
||||||
}
|
}
|
||||||
// 获取按钮权限
|
// 获取按钮权限
|
||||||
export const getAuthButtonListApi = () => {
|
export const getAuthButtonListApi = () => {
|
||||||
return http.get<Login.ResAuthButtons>(`${rePrefix}/auth/buttons`, {}, { loading: false })
|
return http.get<Login.ResAuthButtons>(`/sysFunction/getButton`, {}, { loading: false })
|
||||||
// return http.post<Login.ResAuthButtons>(`/Register3`, {}, { loading: false })
|
// return http.post<Login.ResAuthButtons>(`/Register3`, {}, { loading: false })
|
||||||
}
|
}
|
||||||
// 用户退出登录
|
// 用户退出登录
|
||||||
|
|||||||
@@ -69,7 +69,6 @@ router.beforeEach(async (to, from, next) => {
|
|||||||
await initDynamicRouter()
|
await initDynamicRouter()
|
||||||
return next({ ...to, replace: true })
|
return next({ ...to, replace: true })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 7.存储 routerName 做按钮权限筛选
|
// 7.存储 routerName 做按钮权限筛选
|
||||||
authStore.setRouteName(to.name as string)
|
authStore.setRouteName(to.name as string)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user