From 093ac283007666e6d6dfc074481dc7caf26c415b Mon Sep 17 00:00:00 2001 From: zcx <1078327420@qq.com> Date: Sun, 12 May 2024 19:48:13 +0800 Subject: [PATCH] Squashed commit of the following: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit commit dece352494a0e93f3fd927b3dd31fc3f1e3bd0c3 Author: zcx <1078327420@qq.com> Date: Sun May 12 19:47:44 2024 +0800 1 commit c4de9ccc45f534c19f7a93e7b3ecb4ba3ce429e1 Author: zcx <1078327420@qq.com> Date: Sun May 12 19:36:07 2024 +0800 1 commit 05aefb2d5513312fb3e67747694a6988dca96507 Author: zcx <1078327420@qq.com> Date: Sun May 12 19:28:09 2024 +0800 1 commit 2991a0288ef452759322f6b875e990528b042786 Author: zcx <1078327420@qq.com> Date: Sun May 12 19:24:16 2024 +0800 1 commit f0a01dc52ae4f5b9116cf37645e7a165126ae287 Author: zcx <1078327420@qq.com> Date: Sun May 12 19:14:07 2024 +0800 1 commit 103b91481dd79a631b6c7562405031171bdb11e7 Merge: 3f241a6 d73c814 Author: zcx <1078327420@qq.com> Date: Sat May 11 16:10:15 2024 +0800 Merge branch 'develop' of https://bdgit.educoder.net/mwxbgi697/softegg into 曾晨曦_branch # Conflicts: # src/前端/walktofree/src/components/DemandList.vue # src/前端/walktofree/src/router/index.js --- .../src/components/Communication.vue | 18 +++++++++--------- .../walktofree/src/components/Evaluation.vue | 12 ++++++------ 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/前端/walktofree/src/components/Communication.vue b/src/前端/walktofree/src/components/Communication.vue index 5626e2c..3b0bdf7 100644 --- a/src/前端/walktofree/src/components/Communication.vue +++ b/src/前端/walktofree/src/components/Communication.vue @@ -39,15 +39,15 @@ export default { try { await axios.post('http://example.com/messages', { content: this.newMessage, - sender: 'Me', // You can replace 'Me' with the sender's name + sender: 'Me', // 可以将“Me”替换为发件人的姓名 }); - this.newMessage = ''; // Clear the input field after sending - // You might want to fetch messages again here to update the UI with the latest messages + this.newMessage = ''; // 发送后清除输入字段 + // 在此处再次获取消息,以使用最新消息更新 UI } catch (error) { console.error('Error sending message:', error); } }, - // WebSocket logic to receive messages + // 用于接收消息的 WebSocket 逻辑 setupWebSocket() { const ws = new WebSocket('ws://example.com/socket'); ws.onmessage = (event) => { @@ -57,8 +57,8 @@ export default { }, }, created() { - this.fetchMessages(); // Fetch messages when the component is created - this.setupWebSocket(); // Setup WebSocket connection + this.fetchMessages(); // 创建组件时获取消息 + this.setupWebSocket(); // 设置 WebSocket 连接 }, }; @@ -70,7 +70,7 @@ export default { } .chat { - border: 2px solid #ccc; + border: 2px solid #28a7a3; border-radius: 10px; padding: 20px; display: flex; @@ -100,7 +100,7 @@ export default { .input input { flex: 1; padding: 8px; - border: 1px solid #ccc; + border: 1px solid #003f3f; border-radius: 5px; font-size: 16px; } @@ -110,7 +110,7 @@ export default { border: none; border-radius: 5px; background-color: #007bff; - color: #fff; + color: #a6cfee; font-size: 16px; cursor: pointer; margin-left: 10px; diff --git a/src/前端/walktofree/src/components/Evaluation.vue b/src/前端/walktofree/src/components/Evaluation.vue index 93e2231..18b4ce5 100644 --- a/src/前端/walktofree/src/components/Evaluation.vue +++ b/src/前端/walktofree/src/components/Evaluation.vue @@ -2,7 +2,7 @@