From 199c576904884f4af1108067cc865514ac807bd2 Mon Sep 17 00:00:00 2001 From: maochaoying <925670706@qq.com> Date: Wed, 16 Aug 2023 13:25:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=AC=A1=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Test.vue | 4 ++-- src/pages/Home.vue | 1 + src/socket/index.js | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/Test.vue b/src/components/Test.vue index ae29e56..faca1cc 100644 --- a/src/components/Test.vue +++ b/src/components/Test.vue @@ -204,12 +204,12 @@ const deviceStore = useDeviceStore() const websocketStore = useWebSocketStore() const settingStore = useSettingStore() -const addLiquidVal = ref(300) +const addLiquidVal = ref(settingStore.addLiquidConfigVal) const addLiquidPower = ref(25) const numberKeyboardShowVal = ref(false) const numberKeyboardShowPower = ref(false) -const addLiquidVal2 = ref(300) +const addLiquidVal2 = ref(settingStore.sprayLiquidConfigVal) const addLiquidPower2 = ref(25) const numberKeyboardShowVal2 = ref(false) const numberKeyboardShowPower2 = ref(false) diff --git a/src/pages/Home.vue b/src/pages/Home.vue index b7c3886..ee9d27e 100644 --- a/src/pages/Home.vue +++ b/src/pages/Home.vue @@ -268,6 +268,7 @@ onMounted(() => { }, 1000) setTimeout(() => { webSocketStore.sendCommandMsg(getStateJSON) + webSocketStore.sendCommandMsg(getAllSettingJSON) }, 1000) document.addEventListener('click', e => { let box = document.getElementById('keyboard') diff --git a/src/socket/index.js b/src/socket/index.js index 6fe6294..2c791b6 100644 --- a/src/socket/index.js +++ b/src/socket/index.js @@ -4,7 +4,7 @@ export default class Socket { this.protocols = protocols this.ws = null this.reconnectTimeout = 1000 - this.maxReconnectTimes = 5 + this.maxReconnectTimes = 20 } connect() {