fix: 修复消息发送后输入框未清空及自动点赞状态切换问题
修复消息发送后输入框未清空的问题,优化自动点赞任务状态切换逻辑 更新消息处理逻辑,修正构建文件引用路径
This commit is contained in:
18
Cunkebao/dist/.vite/manifest.json
vendored
18
Cunkebao/dist/.vite/manifest.json
vendored
@@ -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"
|
||||
]
|
||||
}
|
||||
}
|
||||
8
Cunkebao/dist/index.html
vendored
8
Cunkebao/dist/index.html
vendored
@@ -11,13 +11,13 @@
|
||||
</style>
|
||||
<!-- 引入 uni-app web-view SDK(必须) -->
|
||||
<script type="text/javascript" src="/websdk.js"></script>
|
||||
<script type="module" crossorigin src="/assets/index-QManA_e5.js"></script>
|
||||
<script type="module" crossorigin src="/assets/index-DX2o9_TA.js"></script>
|
||||
<link rel="modulepreload" crossorigin href="/assets/vendor-2vc8h_ct.js">
|
||||
<link rel="modulepreload" crossorigin href="/assets/utils-6WF66_dS.js">
|
||||
<link rel="modulepreload" crossorigin href="/assets/ui-Cytu8vuP.js">
|
||||
<link rel="modulepreload" crossorigin href="/assets/charts-Cbn6yFil.js">
|
||||
<link rel="modulepreload" crossorigin href="/assets/ui-BSfOMVFg.js">
|
||||
<link rel="modulepreload" crossorigin href="/assets/charts-BET_YNJb.js">
|
||||
<link rel="stylesheet" crossorigin href="/assets/ui-D0C0OGrH.css">
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-BkBrwKGe.css">
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-DwDrBOQB.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
|
||||
@@ -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<any> {
|
||||
|
||||
// 切换任务状态
|
||||
export function toggleAutoLikeTask(data): Promise<any> {
|
||||
return request("/v1/workbench/update-status", { ...data, type: 1 }, "POST");
|
||||
return request("/v1/workbench/update-status", { ...data }, "POST");
|
||||
}
|
||||
|
||||
// 复制自动点赞任务
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -41,6 +41,7 @@ const MessageEnter: React.FC<MessageEnterProps> = ({ contract }) => {
|
||||
content: inputValue,
|
||||
};
|
||||
sendCommand("CmdSendMessage", params);
|
||||
setInputValue("");
|
||||
// try {
|
||||
// onSendMessage(inputValue);
|
||||
// setInputValue("");
|
||||
|
||||
@@ -26,17 +26,22 @@ const messageHandlers: Record<string, MessageHandler> = {
|
||||
// 发送消息响应
|
||||
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);
|
||||
// 在这里添加具体的处理逻辑
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user