修改上传文件

This commit is contained in:
qq787203167
2022-03-23 22:40:40 +08:00
parent c089041fb1
commit 48a9f4c7a4
3 changed files with 9 additions and 8 deletions
@@ -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()
},