From 8f4ecda7eb76b575c6e54c40c111a178017e16be Mon Sep 17 00:00:00 2001 From: sexygoat <1538832180@qq.com> Date: Fri, 24 Apr 2026 14:30:35 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=92=B1=E5=8C=85=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/index/index.vue | 31 ++++++++----------------------- 1 file changed, 8 insertions(+), 23 deletions(-) diff --git a/pages/index/index.vue b/pages/index/index.vue index a5b3c5e..54a404f 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -390,30 +390,15 @@ return; } - // #ifndef H5 - const [err, res] = await uni.getConnectedWifi(); - let needWifiCheck = true; - if (!err && res && res.wifi) { - const currentIP = res.wifi.localIp || ''; - const lanIP = deviceInfo.lan_ip.replace('http://', '').replace('https://', '').split(':')[0]; - const lanIPPrefix = lanIP.split('.').slice(0, 3).join('.'); - const currentIPPrefix = currentIP.split('.').slice(0, 3).join('.'); - if (currentIPPrefix === lanIPPrefix || lanIPPrefix === '0.0.0') { - needWifiCheck = false; - } - } - if (needWifiCheck) { - await new Promise((resolve) => { - uni.showModal({ - title: '提示', - content: '请先连接设备WiFi,否则无法访问后台管理', - showCancel: false, - buttonText: '我知道了', - success: () => resolve() - }); + await new Promise((resolve) => { + uni.showModal({ + title: '提示', + content: '请先连接设备WiFi,否则无法访问后台管理', + showCancel: false, + buttonText: '我知道了', + success: () => resolve() }); - } - // #endif + }); // 跳转到设备后台管理地址 const url = deviceInfo.lan_ip.startsWith('http') ? deviceInfo.lan_ip : `http://${deviceInfo.lan_ip}`;