Skip to content

Commit 6ae51cd

Browse files
committed
👽 由于服务端修改了登陆时 roleCodes 属性的name,这里同步修改
1 parent 67a16e5 commit 6ae51cd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/store/modules/user.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,16 +51,16 @@ const user = {
5151

5252
const attributes = res.attributes || {}
5353
const permissions = attributes.permissions
54-
const roles = attributes.roles
54+
const roleCodes = attributes.roleCodes
5555

5656
if (permissions.length < 0) {
5757
reject(new Error('getInfo: roles must be a non-null array !'))
5858
}
5959

6060
Vue.ls.set(USER_INFO, info, ttl)
6161
commit('SET_INFO', info)
62-
Vue.ls.set(ROLES, roles, ttl)
63-
commit('SET_ROLES', roles)
62+
Vue.ls.set(ROLES, roleCodes, ttl)
63+
commit('SET_ROLES', roleCodes)
6464
Vue.ls.set(PERMISSIONS, permissions, ttl)
6565
commit('SET_PERMISSIONS', permissions)
6666
Vue.ls.set(ACCESS_TOKEN, accessToken, ttl)

0 commit comments

Comments
 (0)