From 0bddc4dc5b7968ba3cb168e91673b2e655df2cff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B6=85=E7=BA=A7=E8=80=81=E7=99=BD=E5=85=94?= Date: Wed, 3 Sep 2025 17:05:53 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=B6=88=E6=81=AF?= =?UTF-8?q?=E5=8F=91=E9=80=81=E5=90=8E=E8=BE=93=E5=85=A5=E6=A1=86=E6=9C=AA?= =?UTF-8?q?=E6=B8=85=E7=A9=BA=E5=8F=8A=E8=87=AA=E5=8A=A8=E7=82=B9=E8=B5=9E?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E5=88=87=E6=8D=A2=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复消息发送后输入框未清空的问题,优化自动点赞任务状态切换逻辑 更新消息处理逻辑,修正构建文件引用路径 --- Cunkebao/dist/.vite/manifest.json | 18 +++++++++--------- Cunkebao/dist/index.html | 8 ++++---- .../mobile/workspace/auto-like/list/api.ts | 4 ++-- .../mobile/workspace/auto-like/list/index.tsx | 3 +-- .../components/MessageEnter/index.tsx | 1 + .../src/store/module/websocket/msgManage.ts | 7 ++++++- 6 files changed, 23 insertions(+), 18 deletions(-) diff --git a/Cunkebao/dist/.vite/manifest.json b/Cunkebao/dist/.vite/manifest.json index cc80cbd8..90e573c1 100644 --- a/Cunkebao/dist/.vite/manifest.json +++ b/Cunkebao/dist/.vite/manifest.json @@ -1,14 +1,14 @@ { - "_charts-Cbn6yFil.js": { - "file": "assets/charts-Cbn6yFil.js", + "_charts-BET_YNJb.js": { + "file": "assets/charts-BET_YNJb.js", "name": "charts", "imports": [ - "_ui-Cytu8vuP.js", + "_ui-BSfOMVFg.js", "_vendor-2vc8h_ct.js" ] }, - "_ui-Cytu8vuP.js": { - "file": "assets/ui-Cytu8vuP.js", + "_ui-BSfOMVFg.js": { + "file": "assets/ui-BSfOMVFg.js", "name": "ui", "imports": [ "_vendor-2vc8h_ct.js" @@ -33,18 +33,18 @@ "name": "vendor" }, "index.html": { - "file": "assets/index-QManA_e5.js", + "file": "assets/index-DX2o9_TA.js", "name": "index", "src": "index.html", "isEntry": true, "imports": [ "_vendor-2vc8h_ct.js", "_utils-6WF66_dS.js", - "_ui-Cytu8vuP.js", - "_charts-Cbn6yFil.js" + "_ui-BSfOMVFg.js", + "_charts-BET_YNJb.js" ], "css": [ - "assets/index-BkBrwKGe.css" + "assets/index-DwDrBOQB.css" ] } } \ No newline at end of file diff --git a/Cunkebao/dist/index.html b/Cunkebao/dist/index.html index 93421b47..d9e4faec 100644 --- a/Cunkebao/dist/index.html +++ b/Cunkebao/dist/index.html @@ -11,13 +11,13 @@ - + - - + + - +
diff --git a/Cunkebao/src/pages/mobile/workspace/auto-like/list/api.ts b/Cunkebao/src/pages/mobile/workspace/auto-like/list/api.ts index 615cb7ff..ddc48d91 100644 --- a/Cunkebao/src/pages/mobile/workspace/auto-like/list/api.ts +++ b/Cunkebao/src/pages/mobile/workspace/auto-like/list/api.ts @@ -5,7 +5,7 @@ import { UpdateLikeTaskData, LikeRecord, PaginatedResponse, -} from "@/pages/workspace/auto-like/record/data"; +} from "@/pages/mobile/workspace/auto-like/record/data"; // 获取自动点赞任务列表 export function fetchAutoLikeTasks( @@ -36,7 +36,7 @@ export function deleteAutoLikeTask(id: string): Promise { // 切换任务状态 export function toggleAutoLikeTask(data): Promise { - return request("/v1/workbench/update-status", { ...data, type: 1 }, "POST"); + return request("/v1/workbench/update-status", { ...data }, "POST"); } // 复制自动点赞任务 diff --git a/Cunkebao/src/pages/mobile/workspace/auto-like/list/index.tsx b/Cunkebao/src/pages/mobile/workspace/auto-like/list/index.tsx index 073603ee..a967f725 100644 --- a/Cunkebao/src/pages/mobile/workspace/auto-like/list/index.tsx +++ b/Cunkebao/src/pages/mobile/workspace/auto-like/list/index.tsx @@ -201,8 +201,7 @@ const AutoLike: React.FC = () => { // 切换任务状态 const toggleTaskStatus = async (id: string, status: number) => { try { - const newStatus = status === 1 ? "2" : "1"; - await toggleAutoLikeTask(id, newStatus); + await toggleAutoLikeTask({ id }); Toast.show({ content: status === 1 ? "已暂停" : "已启动", position: "top", diff --git a/Cunkebao/src/pages/pc/ckbox/components/ChatWindow/components/MessageEnter/index.tsx b/Cunkebao/src/pages/pc/ckbox/components/ChatWindow/components/MessageEnter/index.tsx index edd49db9..a98efaf1 100644 --- a/Cunkebao/src/pages/pc/ckbox/components/ChatWindow/components/MessageEnter/index.tsx +++ b/Cunkebao/src/pages/pc/ckbox/components/ChatWindow/components/MessageEnter/index.tsx @@ -41,6 +41,7 @@ const MessageEnter: React.FC = ({ contract }) => { content: inputValue, }; sendCommand("CmdSendMessage", params); + setInputValue(""); // try { // onSendMessage(inputValue); // setInputValue(""); diff --git a/Cunkebao/src/store/module/websocket/msgManage.ts b/Cunkebao/src/store/module/websocket/msgManage.ts index 66610f93..3940a83b 100644 --- a/Cunkebao/src/store/module/websocket/msgManage.ts +++ b/Cunkebao/src/store/module/websocket/msgManage.ts @@ -26,17 +26,22 @@ const messageHandlers: Record = { // 发送消息响应 CmdSendMessageResp: message => { console.log("发送消息响应", message); + addMessage(message.friendMessage); + // 在这里添加具体的处理逻辑 + }, + CmdSendMessageResult: message => { + console.log("发送消息结果", message); // 在这里添加具体的处理逻辑 }, // 接收消息响应 CmdReceiveMessageResp: message => { console.log("接收消息响应", message); + addMessage(message.friendMessage); // 在这里添加具体的处理逻辑 }, //收到消息 CmdNewMessage: (message: Messages) => { console.log("收到消息", message.friendMessage); - addMessage(message.friendMessage); // 在这里添加具体的处理逻辑 },