|
@@ -4,8 +4,8 @@ import Store from '@/store'
|
|
|
export const webSocket = {
|
|
|
methods: {
|
|
|
connectWebSocket(userId) {
|
|
|
- let webSocket = new WebSocket(`ws://192.168.1.3:8877/api/xiaoshi/ws/` + userId)
|
|
|
- // let webSocket = new WebSocket(`ws://${this.$c.WebSocketPath}/api/xiaoshi/ws/` + userId)
|
|
|
+ // let webSocket = new WebSocket(`ws://192.168.1.3:8877/api/xiaoshi/ws/` + userId)
|
|
|
+ let webSocket = new WebSocket(`ws://${this.$c.WebSocketPath}/api/xiaoshi/ws/` + userId)
|
|
|
Store.commit('SET_WEB_SOCKET', webSocket)
|
|
|
webSocket.onopen = () => {
|
|
|
console.log('WebSocket连接成功')
|