mirror of
https://github.com/leion8310/SpringBoot-Shiro-Vue.git
synced 2026-11-04 09:03:56 +00:00
'前端说明'
This commit is contained in:
+3
-4
@@ -41,9 +41,9 @@
|
||||
}
|
||||
```
|
||||
|
||||
为什么不在登录的时候一并返回呢? 因为页面F5刷新的时候,vuex信息会丢失,所以需要重新查询一遍这些权限信息. 当然,把权限信息存入cookie也可以解决.
|
||||
为什么不在登录的时候一并返回呢? 因为页面F5刷新的时候,vuex信息会丢失,所以需要重新查询一遍这些权限信息. 当然,把权限信息存入cookie也可以解决.
|
||||
|
||||
拿到userPermission后,调用生成动态路由的方法
|
||||
拿到userPermission后,调用生成动态路由的方法
|
||||
|
||||
```javascript
|
||||
store.dispatch('GenerateRoutes', userPermission).then(() => {
|
||||
@@ -64,5 +64,4 @@ export function hasPermission(permission) {
|
||||
let myPermissions = store.getters.permissions;
|
||||
return myPermissions.indexOf(permission) > -1;
|
||||
}
|
||||
```
|
||||
|
||||
```
|
||||
Reference in New Issue
Block a user