Skip to content
This repository was archived by the owner on May 12, 2020. It is now read-only.

Commit bf1a11a

Browse files
committed
fix(permission): correct user_info fetching
correct user info fetching when page refresh.
1 parent 7d0f9b0 commit bf1a11a

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/permission/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ router.beforeEach((to, from, next) => {
9898
)
9999
store.commit(
100100
`login/${loginTypes.SET_USER_INFO}`,
101-
JSON.parse(userInfoFromStorage.getItem()).username
101+
JSON.parse(userInfoFromStorage.getItem())
102102
)
103103
})
104104
.then(() => createRoutesMap(to, next))

src/utils/storage.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const TOKEN_KEY = '$_tk'
2-
const USER_INFO_KEY = '$_usn'
2+
const USER_INFO_KEY = '$_usi'
33

44
function setValueToLocal (key, val, storage) {
55
const normalizeVal = typeof val === 'string'

0 commit comments

Comments
 (0)