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": {
|
"_charts-BET_YNJb.js": {
|
||||||
"file": "assets/charts-Cbn6yFil.js",
|
"file": "assets/charts-BET_YNJb.js",
|
||||||
"name": "charts",
|
"name": "charts",
|
||||||
"imports": [
|
"imports": [
|
||||||
"_ui-Cytu8vuP.js",
|
"_ui-BSfOMVFg.js",
|
||||||
"_vendor-2vc8h_ct.js"
|
"_vendor-2vc8h_ct.js"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"_ui-Cytu8vuP.js": {
|
"_ui-BSfOMVFg.js": {
|
||||||
"file": "assets/ui-Cytu8vuP.js",
|
"file": "assets/ui-BSfOMVFg.js",
|
||||||
"name": "ui",
|
"name": "ui",
|
||||||
"imports": [
|
"imports": [
|
||||||
"_vendor-2vc8h_ct.js"
|
"_vendor-2vc8h_ct.js"
|
||||||
@@ -33,18 +33,18 @@
|
|||||||
"name": "vendor"
|
"name": "vendor"
|
||||||
},
|
},
|
||||||
"index.html": {
|
"index.html": {
|
||||||
"file": "assets/index-QManA_e5.js",
|
"file": "assets/index-DX2o9_TA.js",
|
||||||
"name": "index",
|
"name": "index",
|
||||||
"src": "index.html",
|
"src": "index.html",
|
||||||
"isEntry": true,
|
"isEntry": true,
|
||||||
"imports": [
|
"imports": [
|
||||||
"_vendor-2vc8h_ct.js",
|
"_vendor-2vc8h_ct.js",
|
||||||
"_utils-6WF66_dS.js",
|
"_utils-6WF66_dS.js",
|
||||||
"_ui-Cytu8vuP.js",
|
"_ui-BSfOMVFg.js",
|
||||||
"_charts-Cbn6yFil.js"
|
"_charts-BET_YNJb.js"
|
||||||
],
|
],
|
||||||
"css": [
|
"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>
|
</style>
|
||||||
<!-- 引入 uni-app web-view SDK(必须) -->
|
<!-- 引入 uni-app web-view SDK(必须) -->
|
||||||
<script type="text/javascript" src="/websdk.js"></script>
|
<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/vendor-2vc8h_ct.js">
|
||||||
<link rel="modulepreload" crossorigin href="/assets/utils-6WF66_dS.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/ui-BSfOMVFg.js">
|
||||||
<link rel="modulepreload" crossorigin href="/assets/charts-Cbn6yFil.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/ui-D0C0OGrH.css">
|
||||||
<link rel="stylesheet" crossorigin href="/assets/index-BkBrwKGe.css">
|
<link rel="stylesheet" crossorigin href="/assets/index-DwDrBOQB.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import {
|
|||||||
UpdateLikeTaskData,
|
UpdateLikeTaskData,
|
||||||
LikeRecord,
|
LikeRecord,
|
||||||
PaginatedResponse,
|
PaginatedResponse,
|
||||||
} from "@/pages/workspace/auto-like/record/data";
|
} from "@/pages/mobile/workspace/auto-like/record/data";
|
||||||
|
|
||||||
// 获取自动点赞任务列表
|
// 获取自动点赞任务列表
|
||||||
export function fetchAutoLikeTasks(
|
export function fetchAutoLikeTasks(
|
||||||
@@ -36,7 +36,7 @@ export function deleteAutoLikeTask(id: string): Promise<any> {
|
|||||||
|
|
||||||
// 切换任务状态
|
// 切换任务状态
|
||||||
export function toggleAutoLikeTask(data): 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) => {
|
const toggleTaskStatus = async (id: string, status: number) => {
|
||||||
try {
|
try {
|
||||||
const newStatus = status === 1 ? "2" : "1";
|
await toggleAutoLikeTask({ id });
|
||||||
await toggleAutoLikeTask(id, newStatus);
|
|
||||||
Toast.show({
|
Toast.show({
|
||||||
content: status === 1 ? "已暂停" : "已启动",
|
content: status === 1 ? "已暂停" : "已启动",
|
||||||
position: "top",
|
position: "top",
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ const MessageEnter: React.FC<MessageEnterProps> = ({ contract }) => {
|
|||||||
content: inputValue,
|
content: inputValue,
|
||||||
};
|
};
|
||||||
sendCommand("CmdSendMessage", params);
|
sendCommand("CmdSendMessage", params);
|
||||||
|
setInputValue("");
|
||||||
// try {
|
// try {
|
||||||
// onSendMessage(inputValue);
|
// onSendMessage(inputValue);
|
||||||
// setInputValue("");
|
// setInputValue("");
|
||||||
|
|||||||
@@ -26,17 +26,22 @@ const messageHandlers: Record<string, MessageHandler> = {
|
|||||||
// 发送消息响应
|
// 发送消息响应
|
||||||
CmdSendMessageResp: message => {
|
CmdSendMessageResp: message => {
|
||||||
console.log("发送消息响应", message);
|
console.log("发送消息响应", message);
|
||||||
|
addMessage(message.friendMessage);
|
||||||
|
// 在这里添加具体的处理逻辑
|
||||||
|
},
|
||||||
|
CmdSendMessageResult: message => {
|
||||||
|
console.log("发送消息结果", message);
|
||||||
// 在这里添加具体的处理逻辑
|
// 在这里添加具体的处理逻辑
|
||||||
},
|
},
|
||||||
// 接收消息响应
|
// 接收消息响应
|
||||||
CmdReceiveMessageResp: message => {
|
CmdReceiveMessageResp: message => {
|
||||||
console.log("接收消息响应", message);
|
console.log("接收消息响应", message);
|
||||||
|
addMessage(message.friendMessage);
|
||||||
// 在这里添加具体的处理逻辑
|
// 在这里添加具体的处理逻辑
|
||||||
},
|
},
|
||||||
//收到消息
|
//收到消息
|
||||||
CmdNewMessage: (message: Messages) => {
|
CmdNewMessage: (message: Messages) => {
|
||||||
console.log("收到消息", message.friendMessage);
|
console.log("收到消息", message.friendMessage);
|
||||||
addMessage(message.friendMessage);
|
|
||||||
// 在这里添加具体的处理逻辑
|
// 在这里添加具体的处理逻辑
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user