From b3080cd7524075f55e7fceed69c4f042f1ed12f2 Mon Sep 17 00:00:00 2001
From: eight <641137800@qq.com>
Date: 星期日, 01 九月 2024 21:31:04 +0800
Subject: [PATCH] fix bug,  user store reference issue

---
 src/store/modules/user.ts |   18 ++++++++++++++----
 1 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts
index 8fd7e8d..60867c8 100644
--- a/src/store/modules/user.ts
+++ b/src/store/modules/user.ts
@@ -44,7 +44,9 @@
       roomId: 0,
       roomName: "",
       bedNo: "",
-      onstage: true
+      status: null,
+      docId: null,
+      docName: null
     }
   }),
   getters: {
@@ -64,7 +66,7 @@
     getIsSetRoom(): boolean {
       return this.isSetRoom
     },
-    getRoom(): RoomVO {
+    getRoom(): RoomVO | null {
       return this.room
     }
   },
@@ -88,7 +90,13 @@
     // 鍖荤敓鍏ュ骇
     async setRoomInfoAction(room: RoomVO) {
       // 鏇存柊 store
-      this.room = room
+      this.room!.id = room.id
+      this.room!.roomId = room.roomId
+      this.room!.roomName = room.roomName
+      this.room!.bedNo = room.bedNo
+      this.room!.status = room.status
+      this.room!.docId = room.docId
+      this.room!.docName = room.docName
       this.isSetRoom = true
 
       // 鏇存柊 cache
@@ -151,7 +159,9 @@
         roomId: 0,
         roomName: "",
         bedNo: "",
-        onstage: true
+        status: null,
+        docId: null,
+        docName: null
       }
     }
   }

--
Gitblit v1.9.3