Compare commits

..

1 Commits

Author SHA1 Message Date
kk 020e131df0 解决user_id为空提示
Uni-app H5 Deploy (Prod + Staging) / deploy (release) Successful in 42s
2026-07-11 20:43:56 +08:00
2 changed files with 5 additions and 3 deletions
+4 -2
View File
@@ -151,17 +151,19 @@ export default {
}, },
methods: { methods: {
// 外部调用:启动开门流程 // 外部调用:启动开门流程
async open() { async open(userId) {
if (this.step) return; if (this.step) return;
this.cancelled = false; this.cancelled = false;
this.step = 'opening'; this.step = 'opening';
const uid = userId || this.userId;
try { try {
const res = await post('/device-scan/open', { const res = await post('/device-scan/open', {
device_id: this.deviceId, device_id: this.deviceId,
door_index: 0, door_index: 0,
user_id: this.userId user_id: uid
}); });
const ret = res.data || {}; const ret = res.data || {};
+1 -1
View File
@@ -441,7 +441,7 @@ export default {
} }
// 调用组件方法启动开门流程 // 调用组件方法启动开门流程
this.$refs.doorPanel.open(); this.$refs.doorPanel.open(this.userId);
}, },
handleMenuClick(item) { handleMenuClick(item) {
switch (item.action) { switch (item.action) {