From 06350edeca4744df8de1492cbbf33269246f5cf0 Mon Sep 17 00:00:00 2001 From: duqingquan Date: Wed, 29 Mar 2023 17:59:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dwifi=20=E6=8F=92=E4=BB=B6?= =?UTF-8?q?=E9=83=A8=E5=88=86=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/index/index.vue | 24 +++++++++++++++++++ .../uni-wifi/utssdk/app-android/index.uts | 2 ++ 2 files changed, 26 insertions(+) diff --git a/pages/index/index.vue b/pages/index/index.vue index 0e8e0a8..f64e148 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -9,6 +9,8 @@ + + @@ -39,6 +41,28 @@ onMemoryWarning:function(res){ console.log(res); }, + fn:function(res){ + console.log(res) + }, + onGetWifiList2_assert0() { + const fn = res => console.log('onGetWifiList res', res) + uni.startWifi({success(){ + uni.onGetWifiList(fn) + uni.getWifiList({ + success() { + console.log('getWifiList success'); + uni.offGetWifiList(fn) + uni.stopWifi({ + success() {}, + fail(e) { + console.log("stopWifi fail: ",e); + } + }) + } + }) + }}) + }, + testConnnectWifi(){ uni.startWifi({ diff --git a/uni_modules/uni-wifi/utssdk/app-android/index.uts b/uni_modules/uni-wifi/utssdk/app-android/index.uts index bac1493..6a9dc9b 100644 --- a/uni_modules/uni-wifi/utssdk/app-android/index.uts +++ b/uni_modules/uni-wifi/utssdk/app-android/index.uts @@ -539,6 +539,8 @@ export function onGetWifiList(callback : UTSCallback) { */ export function offGetWifiList(callback? : UTSCallback) { Global.onGetWifiListCallback = null + Global.supendGetWifiComplete = null + Global.supendGetWifiSuccess = null } -- GitLab