diff --git a/src/App.vue b/src/App.vue index 9cf122b..152499f 100644 --- a/src/App.vue +++ b/src/App.vue @@ -47,14 +47,11 @@ export default { } }, async mounted () { - const a = await this.GET_DEPLIST() - console.log('a: ', a) }, methods: { onCancel () { }, - ...mapActions(['GET_DEPLIST']), ...mapMutations(['SET_USER_INFO']), // 获取钉钉鉴权码 handleGetDingtalkCode () { diff --git a/src/utils/permission.js b/src/utils/permission.js index e1c92c1..c201c0a 100644 --- a/src/utils/permission.js +++ b/src/utils/permission.js @@ -45,6 +45,7 @@ router.beforeEach(async (to, from, next) => { if (res === 1) { console.log('res: ', res) let res1 = await store.dispatch('GET_USERINFO') + await store.dispatch('GET_DEPLIST') console.log('res1: ', res1) if (res1 === 1) next() } else {