dispatch: 含有异步操作commit:同步操作 dispatch: 含有异步操作存储:this.$store.dispatch('initUserInfo',friend); 取值:this.$store.getters.userInfo; commit:同步操作存储:this.$store.commit('initUserInfo',friend); 取值:this.$store.state.userInfo;