From 020e131df01de4c47731ba4f47730694ee3dc557 Mon Sep 17 00:00:00 2001 From: kk <875203880@qq.com> Date: Sat, 11 Jul 2026 20:43:56 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3user=5Fid=E4=B8=BA=E7=A9=BA?= =?UTF-8?q?=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/door-panel/door-panel.vue | 6 ++++-- src/pages/index/index.vue | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/door-panel/door-panel.vue b/src/components/door-panel/door-panel.vue index afb7670..98a120d 100644 --- a/src/components/door-panel/door-panel.vue +++ b/src/components/door-panel/door-panel.vue @@ -151,17 +151,19 @@ export default { }, methods: { // 外部调用:启动开门流程 - async open() { + async open(userId) { if (this.step) return; this.cancelled = false; this.step = 'opening'; + const uid = userId || this.userId; + try { const res = await post('/device-scan/open', { device_id: this.deviceId, door_index: 0, - user_id: this.userId + user_id: uid }); const ret = res.data || {}; diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue index 9523562..883f3f3 100644 --- a/src/pages/index/index.vue +++ b/src/pages/index/index.vue @@ -441,7 +441,7 @@ export default { } // 调用组件方法启动开门流程 - this.$refs.doorPanel.open(); + this.$refs.doorPanel.open(this.userId); }, handleMenuClick(item) { switch (item.action) {