From c573cd85962d0f2ae1dd542f3e10e4097e63091c Mon Sep 17 00:00:00 2001
From: zhangchen <1652267879@qq.com>
Date: 星期五, 12 九月 2025 11:42:18 +0800
Subject: [PATCH] ID1766-暂存

---
 src/views/mobile/bedsideAuxiliaryScreen/components/Login/index.vue |   18 +++++++++++++++---
 1 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/src/views/mobile/bedsideAuxiliaryScreen/components/Login/index.vue b/src/views/mobile/bedsideAuxiliaryScreen/components/Login/index.vue
index 43c53fc..697cd71 100644
--- a/src/views/mobile/bedsideAuxiliaryScreen/components/Login/index.vue
+++ b/src/views/mobile/bedsideAuxiliaryScreen/components/Login/index.vue
@@ -59,12 +59,13 @@
     });
 
     const isLoginng = computed(() => {
-      return !!bedsideAuxiliaryScreenStore.token;
+      return !!bedsideAuxiliaryScreenStore.userInfo?.code;
     });
 
     const qrCodeData = computed(() => {
       return {
         deviceCode: bedsideAuxiliaryScreenStore.deviceCode,
+        deviceNo: bedsideAuxiliaryScreenStore.deviceData.devicdeNo,
       };
     });
 
@@ -77,13 +78,24 @@
     };
 
     const onLogout = () => {
+      if (state.loading) return ElMessage.warning('正在退出中...')
       ElMessageBox.confirm("是否确认退出当前登录用户?", "提示", {
         confirmButtonText: "确认",
         cancelButtonText: "取消",
         type: "warning",
       })
-        .then(() => {
-            bedsideAuxiliaryScreenStore.logout();
+        .then(async() => {
+            state.loading = true
+            try {
+              await bedsideAuxiliaryScreenStore.logout(bedsideAuxiliaryScreenStore.deviceCode);
+              handleCancel();
+              ElMessage.success('退出登录成功')
+              handleCancel();
+            } catch (error) {
+              ElMessage.success('退出登录失败')
+            } finally {
+              state.loading = false;
+            }
           ElMessage({
             type: "success",
             message: "退出成功!",

--
Gitblit v1.8.0