src/views/login/index.vue
@@ -95,6 +95,7 @@ const res = response.data if (res.code == 200) { localStorage.setItem('loginForm',JSON.stringify(loginForm)) // this.$store.dispatch('user/getClassifyOne',1) _this.loading = false const data = res.result if (data.type != 1 && data.type != 2) { @@ -113,6 +114,7 @@ _this.$store.commit('SET_ROLES', data.roles) Cookies.set('roles', JSON.stringify(data.roles)) setToken(data.token) Cookies.set('loginForm',data) Cookies.set('userName', data.username) Cookies.set('name', data.username) Cookies.set('userId', data.id)