|
|
@@ -280,21 +280,14 @@ export default {
|
|
|
})
|
|
|
.then(res => {
|
|
|
localStorage.setItem('token', res);
|
|
|
- return this.$http.get('/user/my');
|
|
|
+ return this.$store.dispatch('getUserInfo');
|
|
|
})
|
|
|
.then(res => {
|
|
|
- this.loading = false;
|
|
|
- this.$store.commit('updateUserInfo', res);
|
|
|
- let flag = res.authorities.find(item => {
|
|
|
- return item.name == 'ROLE_ORGANIZER';
|
|
|
- });
|
|
|
- if (typeof flag != 'undefined') {
|
|
|
- this.$http.get('/organization/getByUserId/' + res.id).then(index => {
|
|
|
- this.$store.commit('updateOrganization', index);
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.loading = false;
|
|
|
+ this.$router.replace({
|
|
|
+ name: this.$route.params.name || 'dashboard'
|
|
|
});
|
|
|
- }
|
|
|
- this.$router.replace({
|
|
|
- name: this.$route.params.name || 'dashboard'
|
|
|
});
|
|
|
})
|
|
|
.catch(e => {
|