@@ -29,23 +29,23 @@ import Screenfull from './Screenfull'
29
29
import User from ' ./User'
30
30
import ClearTab from ' ./ClearTab'
31
31
import { getToken } from ' @/lin/utils/token'
32
- import store from ' @/store'
32
+ // import store from '@/store'
33
33
34
34
export default {
35
35
name: ' NavBar' ,
36
36
created () {
37
- this .$connect (this .path , { format: ' json' })
38
- this .$options .sockets .onmessage = data => {
39
- console .log (JSON .parse (data .data ))
40
- this .messages .push (JSON .parse (data .data ))
41
- }
42
- this .$options .sockets .onerror = err => {
43
- console .log (err)
44
- this .$message .error (' token已过期,请重新登录' )
45
- store .dispatch (' loginOut' )
46
- const { origin } = window .location
47
- window .location .href = origin
48
- }
37
+ // this.$connect(this.path, { format: 'json' })
38
+ // this.$options.sockets.onmessage = data => {
39
+ // console.log(JSON.parse(data.data))
40
+ // this.messages.push(JSON.parse(data.data))
41
+ // }
42
+ // this.$options.sockets.onerror = err => {
43
+ // console.log(err)
44
+ // this.$message.error('token已过期,请重新登录')
45
+ // store.dispatch('loginOut')
46
+ // const { origin } = window.location
47
+ // window.location.href = origin
48
+ // }
49
49
},
50
50
watch: {
51
51
messages: {
0 commit comments