|
@@ -111,16 +111,7 @@
|
|
|
key: 'token',
|
|
|
success: function(res) {
|
|
|
let user = that.$jwt(res.data);
|
|
|
- if (user) {
|
|
|
- that.$set(that, `user`, user)
|
|
|
- if (that.$store.state.socketTask == null) {
|
|
|
- //当websocket收到后端发送的消息时,触发
|
|
|
- let config = that.$config.wsUrl;
|
|
|
- // 开启websocket
|
|
|
- that.$store.dispatch('websocketInit', config +
|
|
|
- `/${user._id}`);
|
|
|
- }
|
|
|
- }
|
|
|
+ if (user) that.$set(that, `user`, user)
|
|
|
}
|
|
|
})
|
|
|
},
|