Skip to content

Commit 5e48023

Browse files
committed
fix: websocket
1 parent 2f3a4dc commit 5e48023

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

admin/src/views/api_excel/index.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ export default {
216216
},
217217
initWebSocket(id) { // 初始化 weosocket
218218
if ('WebSocket' in window) {
219-
const url = 'ws://127.0.0.1:5200?id=' + id
219+
const url = 'ws://118.25.87.12:5200?id=' + id
220220
this.websock = new WebSocket(url)
221221
this.websock.onmessage = this.onmessage
222222
this.websock.onopen = this.onopen
@@ -238,8 +238,8 @@ export default {
238238
onmessage(e) { // 数据接收
239239
console.log(e.data)
240240
const data = JSON.parse(e.data)
241-
this.list[2].rate = parseInt(data.data.rate)
242-
console.log(this.list[2].rate)
241+
// this.list[2].rate = parseInt(data.data.rate)
242+
// console.log(this.list[2].rate)
243243
console.log(data)
244244
},
245245
send(Data) {

0 commit comments

Comments
 (0)