From 2bb9a863e75312fe90869ea3deea137b46b1bb1e Mon Sep 17 00:00:00 2001
From: haoxuan <haoxuan>
Date: 星期一, 06 十一月 2023 17:46:43 +0800
Subject: [PATCH] 拉代码

---
 src/stores/devices.ts |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/stores/devices.ts b/src/stores/devices.ts
index fb0fd53..a23d468 100644
--- a/src/stores/devices.ts
+++ b/src/stores/devices.ts
@@ -1,4 +1,4 @@
-import { computed, onUnmounted } from 'vue'
+import { computed } from 'vue'
 import { defineStore } from 'pinia'
 import { getDeviceList } from '@/api'
 import { useRequest } from 'vue-hooks-plus'
@@ -7,6 +7,9 @@
 
 export const useDevicesStore = defineStore('device', () => {
   const deviceInfo = computed(() => {
+    if (deviceInfo?.value) {
+      deviceRes.value.data.currentDeviceID = 'wwwwwwww222222'
+    }
     return deviceRes?.value?.data as Devices
   })
 
@@ -27,10 +30,6 @@
     cancelDevicePolling()
     startDevicePolling()
   }
-
-  onUnmounted(() => {
-    cancelDevicePolling()
-  })
 
   return { deviceInfo, startPollingDevice }
 })

--
Gitblit v1.8.0