From 287ebd61bb900d52fa968fc7eaf525728cc848fb Mon Sep 17 00:00:00 2001
From: qx <1084500556@qq.com>
Date: 星期四, 24 七月 2025 10:49:01 +0800
Subject: [PATCH] qx

---
 src/views/system/tijian/index.vue |   18 ++++++++++++------
 1 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/src/views/system/tijian/index.vue b/src/views/system/tijian/index.vue
index cababad..7ecfeea 100644
--- a/src/views/system/tijian/index.vue
+++ b/src/views/system/tijian/index.vue
@@ -987,10 +987,10 @@
         pacName: null,
         pacRemark: null,
       },
-      // valueUrl: "ws://127.0.0.1:6789/websocket",
-      // valueUrls: "ws://127.0.0.1:6789/websocket",
-      valueUrl: "ws://192.168.1.244:6789/websocket",
-      valueUrls: "ws://192.168.1.244:6789/websocket",
+      valueUrl: "ws://127.0.0.1:6789/websocket",
+      valueUrls: "ws://127.0.0.1:6789/websocket",
+      // valueUrl: "ws://192.168.1.244:6789/websocket",
+      // valueUrls: "ws://192.168.1.244:6789/websocket",
       webSocket: null,
       // 韬唤璇侀渶瑕�
       // socket: null,
@@ -1978,7 +1978,7 @@
         if (isChineseChar(resultObj.data.sex)) {
           _this.form.cusSex = resultObj.data.sex == "濂�" ? 1 : 0
         } else {
-          _this.form.cusSex = resultObj.data.sex;
+          _this.form.cusSex = resultObj.data.sex ==  "1" ? 0 : 1;
         }
         _this.form.cusNational = resultObj.data.mz;
         _this.form.cusBrithday = resultObj.data.csrq;
@@ -2126,7 +2126,13 @@
         websocket.onmessage = function (event) {
           var resultObj = JSON.parse(event.data);
           _this.form.cusName = resultObj.data.name;
-          _this.form.cusSex = resultObj.data.sex;
+            const isChineseChar = (char) => /[\u4E00-\u9FA5]/.test(char)
+          // _this.form.cusSex = resultObj.data.sex;
+           if (isChineseChar(resultObj.data.sex)) {
+          _this.form.cusSex = resultObj.data.sex == "濂�" ? 1 : 0
+        } else {
+          _this.form.cusSex = resultObj.data.sex ==  "1" ? 0 : 1;
+        }
           _this.form.cusNational = resultObj.data.mz;
           _this.form.cusBrithday = resultObj.data.csrq;
           if (_this.form.cusBrithday) {

--
Gitblit v1.8.0