From 6244c26cd11f6446b39c0ad50c8223b379e5258a Mon Sep 17 00:00:00 2001
From: wupengfei <834520024@qq.com>
Date: 星期五, 07 十一月 2025 19:05:47 +0800
Subject: [PATCH] fix: bug

---
 apps/cMiniApp/src/subpackages/task/taskDetail/InnerPage.vue |   36 ++++++++++++++++++++++--------------
 1 files changed, 22 insertions(+), 14 deletions(-)

diff --git a/apps/cMiniApp/src/subpackages/task/taskDetail/InnerPage.vue b/apps/cMiniApp/src/subpackages/task/taskDetail/InnerPage.vue
index 7ecb2b6..d7a1d9c 100644
--- a/apps/cMiniApp/src/subpackages/task/taskDetail/InnerPage.vue
+++ b/apps/cMiniApp/src/subpackages/task/taskDetail/InnerPage.vue
@@ -129,6 +129,7 @@
 } from '@12333/constants';
 import { useAccessLogin } from '@/hooks';
 import { useTaskInfo } from '@12333/hooks';
+import _ from 'lodash';
 
 defineOptions({
   name: 'InnerPage',
@@ -162,20 +163,27 @@
   }
 });
 
-const handleApply = useAccessReal(
-  async () => {
-    try {
-      let params: API.ApplyTaskCommand = {
-        ids: [id],
-      };
-      let res = await taskUserServices.applyTask(params);
-      if (res) {
-        Message.success('鎶ュ悕鎴愬姛');
-        refetch({ type: 'inactive' });
-      }
-    } catch (error) {}
-  },
-  { message: '瀹炲悕鎴愬姛鍚庢墠鍙姤鍚嶏紝璇峰墠寰�瀹炲悕璁よ瘉' }
+const handleApply = _.debounce(
+  useAccessReal(
+    async () => {
+      try {
+        let params: API.ApplyTaskCommand = {
+          ids: [id],
+        };
+        let res = await taskUserServices.applyTask(params);
+        if (res) {
+          Message.success('鎶ュ悕鎴愬姛');
+          refetch({ type: 'inactive' });
+        }
+      } catch (error) {}
+    },
+    { message: '瀹炲悕鎴愬姛鍚庢墠鍙姤鍚嶏紝璇峰墠寰�瀹炲悕璁よ瘉' }
+  ),
+  1000,
+  {
+    leading: true,
+    trailing: false,
+  }
 );
 
 const handleAttention = useAccessLogin(async () => {

--
Gitblit v1.9.1