From 79c7160d01ffca368af010a1cfd59f416ee8b8cf Mon Sep 17 00:00:00 2001 From: Pan Date: Fri, 5 Jan 2018 13:21:14 +0800 Subject: [PATCH] perf[permission]:set role => roles --- README.md | 2 +- src/store/modules/user.js | 2 +- src/views/dashboard/index.vue | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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 @@