修改上传文件
This commit is contained in:
@@ -136,7 +136,7 @@
|
||||
initWebSocket: function() {
|
||||
// WebSocket与普通的请求所用协议有所不同,ws等同于http,wss等同于https
|
||||
var userId = store.getters.userInfo.id
|
||||
var url = window._CONFIG['domianWebSocketURL'].replace('https://', 'wss://').replace('http://', 'ws://') + '/websocket/'+userId
|
||||
var url = window._CONFIG['domianWebSocketURL'].replace('https://', 'wss://').replace('http://', 'ws://') + '/websocket/' + userId
|
||||
this.websock = new WebSocket(url)
|
||||
this.websock.onopen = this.websocketOnopen
|
||||
this.websock.onerror = this.websocketOnerror
|
||||
@@ -149,7 +149,7 @@
|
||||
this.timer = setInterval(() => {
|
||||
try {
|
||||
self.websock.send('test')
|
||||
console.log('发送消息');
|
||||
console.log('发送消息')
|
||||
} catch (err) {
|
||||
console.log('断开了:' + err)
|
||||
self.connection()
|
||||
@@ -161,7 +161,6 @@
|
||||
this.reconnect()
|
||||
},
|
||||
websocketOnmessage: function(e) {
|
||||
console.log('-----接收消息-------', e)
|
||||
//系统通知
|
||||
this.loadData()
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user