From 57737265b524ebaed76ae6b79330ce308c2cbad1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E8=90=8C?= <525441437@qq.com> Date: Fri, 24 Nov 2023 09:42:41 +0800 Subject: [PATCH] 1 --- src/views/index.vue | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/views/index.vue b/src/views/index.vue index 9fb8756..0748ca7 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -88,6 +88,7 @@ export default { userInfo: null, loading: true,//页面加载 IDTimer: null, + deviceId:'', } }, watch: { @@ -100,6 +101,7 @@ export default { this.getTime() var router = this.$route.query if (router.token && router.userid) { + this.deviceId=router.deviceId?router.deviceId:'' localStorage.setItem('token', router.token) this.api.getUser({ userId: router.userid }).then(res => { @@ -166,6 +168,10 @@ export default { this.leftList[1].list = [] this.leftList[2].list = [] this.$store.state.equipmentList.forEach((el, index) => { + //链接中的deviceId + if(this.deviceId&&this.deviceId==el.deviceId){ + this.$store.state.equipmentIndex = index+1 + } if (el.deviceName == 1) { this.leftList.forEach((el1, index1) => { if (el1.name == '施肥机') {