diff --git a/README.md b/README.md index ef135cd..e57b37c 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ npm run build --report ![demo](https://github.com/PanJiaChen/PanJiaChen.github.io/blob/master/images/demo.gif) ## Extra -If you want router permission && generate menu by user role , you can use this branch [permission-control](https://github.com/PanJiaChen/vueAdmin-template/tree/permission-control) +If you want router permission && generate menu by user roles , you can use this branch [permission-control](https://github.com/PanJiaChen/vueAdmin-template/tree/permission-control) ## Related Project [vue-element-admin](https://github.com/PanJiaChen/vue-element-admin) diff --git a/src/store/modules/user.js b/src/store/modules/user.js index f236e7e..fa9c701 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -45,7 +45,7 @@ const user = { return new Promise((resolve, reject) => { getInfo(state.token).then(response => { const data = response.data - commit('SET_ROLES', data.role) + commit('SET_ROLES', data.roles) commit('SET_NAME', data.name) commit('SET_AVATAR', data.avatar) resolve(response) diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index 6b7681f..4b4625c 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -1,7 +1,7 @@