This commit is contained in:
2025-06-26 09:36:53 +08:00
parent 7ca5709598
commit 85c176597b

View File

@@ -551,8 +551,8 @@
// WebSocket连接
let socket = null;
const serverUrl = "ws://t-ws.nailaoyun.cn/ws/";
// const serverUrl = "ws://127.0.0.1:18282";
// const serverUrl = "ws://t-ws.nailaoyun.cn/ws/";
const serverUrl = "ws://127.0.0.1:8282";
// DOM元素引用
const statusIndicator = document.getElementById('status-indicator');
@@ -613,6 +613,14 @@
addSystemMessage(message.content);
break;
case 'login_success':
axios.post('/api/b', {
client_id: message.client_id,
user_id: currentUser.id
}).then(response => {
console.log('请求成功:', response.data);
}).catch(error => {
console.error('请求出错:', error);
});
addSystemMessage(message.content);
break;