From 64529bf573ee9b436084770c535fec1074185158 Mon Sep 17 00:00:00 2001 From: fengerli <528575642@qq.com> Date: Sat, 16 Aug 2025 14:28:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=8F=91=E9=80=81=E4=BF=A1?= =?UTF-8?q?=E6=81=AFbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/6170/deviceControl/index.vue | 31 +++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/pages/6170/deviceControl/index.vue b/pages/6170/deviceControl/index.vue index 176f31c..bc2ce87 100644 --- a/pages/6170/deviceControl/index.vue +++ b/pages/6170/deviceControl/index.vue @@ -1033,9 +1033,10 @@ this.isSharedDevice = false; this.activePermissions = []; // 非分享设备清空权限 } - - // 关闭加载中 - uni.hideLoading() + if (!isUpdate) { + // 关闭加载中 + uni.hideLoading() + } } }, // 检查权限的方法 @@ -1050,18 +1051,22 @@ async fetchDeviceDetail(id, isUpdate = false) { try { const res = await deviceDetail(id) - if(res.code==200){ + if (res.code == 200) { this.handleDeviceData(res, false, isUpdate) - }else{ + } else { uni.showToast({ - title: error.msg, + title: res.msg, icon: 'none' }) + if (!isUpdate) { + uni.hideLoading() + } + } + + } catch (error) { + if (!isUpdate) { uni.hideLoading() } - - } catch (error) { - uni.hideLoading() // uni.showToast({ // title: error.msg, // icon: 'none' @@ -1072,15 +1077,15 @@ async fetchSharedDeviceDetail(id) { try { const res = await deviceShareId(id) - if(res.code==200){ + if (res.code == 200) { this.handleDeviceData(res, true) - }else{ + } else { uni.showToast({ - title: error.msg, + title: res.msg, icon: 'none' }) } - + } catch (error) { uni.showToast({ title: error.msg,