feature(使用redis缓存): 功能合并

1、缓存改为Redis缓存,不在启动时缓存,使用时候根据数据源缓存
2、前端登录接口调整
This commit is contained in:
lwf
2023-07-26 17:20:54 +08:00
parent 91769f0b75
commit 414c1be128
79 changed files with 1801 additions and 3070 deletions

View File

@ -25,9 +25,10 @@ router.beforeEach((to, from, next) => {
// 获取字典数据 add by 芋艿
store.dispatch('dict/loadDictDatas')
// 判断当前用户是否已拉取完 user_info 信息
store.dispatch('GetInfo').then(() => {
store.dispatch('GetInfo').then(userInfo => {
isRelogin.show = false
store.dispatch('GenerateRoutes').then(accessRoutes => {
// 触发 GenerateRoutes 事件时,将 menus 菜单树传递进去
store.dispatch('GenerateRoutes', userInfo.menus).then(accessRoutes => {
// 根据 roles 权限生成可访问的路由表
router.addRoutes(accessRoutes) // 动态添加可访问路由表
next({ ...to, replace: true }) // hack方法 确保addRoutes已完成