From cf88e627073861c751a9ee6c921190a27c2db18d Mon Sep 17 00:00:00 2001 From: guoapeng Date: Fri, 1 Aug 2025 15:22:43 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=8E=92=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layouts/default.vue | 15 +++++++++++++++ src/libs/utils.ts | 1 + src/views/craft/index.vue | 6 +----- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/src/layouts/default.vue b/src/layouts/default.vue index 736325f..1fe2285 100644 --- a/src/layouts/default.vue +++ b/src/layouts/default.vue @@ -14,6 +14,7 @@ import { isClose, socket } from 'libs/socket' import { cmdNameMap, formatDateTime } from 'libs/utils' import { authRoutes } from 'router/routes' import { useDebugStore } from 'stores/debugStore' +import { useHomeStore } from 'stores/homeStore' import { useSystemStore } from 'stores/systemStore' import { computed, onMounted, onUnmounted, ref, watch } from 'vue' import { useRouter } from 'vue-router' @@ -21,6 +22,7 @@ import { useRouter } from 'vue-router' const { handleLogoClick } = useActivateDebug() const systemStore = useSystemStore() +const homeStore = useHomeStore() const router = useRouter() onMounted(async () => { @@ -185,6 +187,18 @@ const remoteControlState = computed(() => { // charging: true, // 是否正在充电 // } }) + +let currentCommandId = '' +const putEmpty = async () => { + currentCommandId = Date.now().toString() + const params = { + commandId: currentCommandId, + command: 'solution_drain_start', + params: { + }, + } + await homeStore.sendControl(params) +}