From da32252d08f2a52f1ddcdac62e11febb2be3f711 Mon Sep 17 00:00:00 2001
From: chenhaozhe <cgz@hz-kingdee.com>
Date: 星期一, 19 一月 2026 16:08:09 +0800
Subject: [PATCH] 新增 个推 绑定用户设备码, 接受用户点击任务栏事件的功能

---
 utils/getuiUtils.js |   52 +++++++++++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 47 insertions(+), 5 deletions(-)

diff --git a/utils/getuiUtils.js b/utils/getuiUtils.js
index 5268ada..c9e8e10 100644
--- a/utils/getuiUtils.js
+++ b/utils/getuiUtils.js
@@ -1,16 +1,58 @@
+import {
+    CommonUtils
+} from "./common";
+
 class getuiInstance {
     constructor() {
         this.cid = ""
     }
 
-    getClientID() {
+    getClientID(Userbm, UserName) {
         // #ifdef APP-PLUS
-        plus.push.getClientInfoAsync((info) => {
-            this.cid = info["clientid"]
-            console.log('cid: ', this.cid);
-        });
+        const info = plus.push.getClientInfo()
+        this.cid = info["clientid"]
+        console.log('cid: ', this.cid);
+        this.setUserClientIDRelative(Userbm, UserName, this.cid, 1)
         // #endif
+    };
+
+    async setUserClientIDRelative(Userbm, UserName, ClientID, Online) {
+        try {
+            let res = await CommonUtils.doRequest2Async({
+                url: "/Web/SetGy_UserClientIdConnection",
+                method: "POST",
+                data: {
+                    HUserbm: Userbm,
+                    HUserName: UserName,
+                    HClientID: ClientID,
+                    HOnline: Online
+                }
+            })
+            
+
+            let {
+                data,
+                count,
+                Message
+            } = res.data
+            
+            if(count != 1) {
+                CommonUtils.showTips({
+                    title: "娓╅Θ鎻愮ず",
+                    message: Message
+                })
+            }
+        }catch(err) {
+            CommonUtils.showTips({
+                title: "娓╅Θ鎻愮ず",
+                message: err
+            })
+        }
+
     }
 }
 
+
+
+
 export default new getuiInstance()
\ No newline at end of file

--
Gitblit v1.9.1