From a2fb35f6e7a161f080734acbc18ebca337692148 Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期三, 11 二月 2026 14:23:51 +0800
Subject: [PATCH] 打卡添加防抖

---
 src/App.vue |   31 ++++++++++++++++++++++++++++---
 1 files changed, 28 insertions(+), 3 deletions(-)

diff --git a/src/App.vue b/src/App.vue
index 5d802fc..bd95a27 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -7,6 +7,7 @@
 <script setup>
   import { ref, onMounted } from "vue";
   import Splash from "./components/Splash.vue";
+  import { confirmMessage } from "@/api/login.js";
 
   const showSplash = ref(true);
   onMounted(() => {
@@ -28,6 +29,8 @@
       console.log("浣跨敤 plus.push.getClientInfo 鑾峰彇瀹㈡埛绔爣璇�");
       plus.push.getClientInfoAsync(info => {
         console.log("瀹㈡埛绔帹閫佹爣璇�:", info);
+        uni.setStorageSync("clientid", info.clientid);
+
         // 杩欓噷鍙互灏嗗鎴风鏍囪瘑鍙戦�佸埌鏈嶅姟鍣�
       });
       setTimeout(() => {
@@ -52,9 +55,31 @@
   // 澶勭悊鎺ㄩ�佹秷鎭偣鍑讳簨浠�
   const handlePushClick = msg => {
     console.log("鐐瑰嚮鎺ㄩ�佹秷鎭�:", msg);
-    uni.navigateTo({
-      url: msg.payload.pagePath,
-    });
+    console.log("瑙f瀽鍚�:", msg.payload.noticeId);
+    try {
+      confirmMessage(msg.payload.noticeId, 1).then(res => {
+        if (msg.payload.url) {
+          if (msg.payload.url.indexOf("/") === 0) {
+            uni.navigateTo({
+              url: msg.payload.url,
+            });
+          } else {
+            uni.navigateTo({
+              url: "/" + msg.payload.url,
+            });
+          }
+        }
+      });
+    } catch (error) {
+      uni.showToast({
+        title: "璺緞:" + msg.payload,
+        icon: "none",
+      });
+      uni.showToast({
+        title: "璺宠浆澶辫触:" + error.message,
+        icon: "none",
+      });
+    }
     // 瑙f瀽骞跺鐞嗘帹閫佹秷鎭�...
   };
 

--
Gitblit v1.9.3