From d07eaf16d1e8080b3001938092fb41a0a0d571dc Mon Sep 17 00:00:00 2001 From: duqingquan Date: Wed, 31 May 2023 11:36:03 +0800 Subject: [PATCH] =?UTF-8?q?wifi=20=E6=96=B0=E5=A2=9E=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=8C=96=E7=8E=AF=E5=A2=83=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages.json | 21 +++++++++++++++ uni_modules/uni-wifi/utssdk/interface.uts | 2 +- uni_modules/uni-wifi/utssdk/uni.autotest.js | 29 +++++++++++++++++++++ 3 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 uni_modules/uni-wifi/utssdk/uni.autotest.js diff --git a/pages.json b/pages.json index 24f82b8..03593a5 100644 --- a/pages.json +++ b/pages.json @@ -5,6 +5,27 @@ "style": { "navigationBarTitleText": "uni-app" } + }, + { + "path": "pages/autotest/uni-getbatteryinfo/uni-getbatteryinfo", + "style": { + "navigationBarTitleText": "uni-getbatteryinfo", + "enablePullDownRefresh": false + } + }, + { + "path": "pages/autotest/uni-memorywarning/uni-memorywarning", + "style": { + "navigationBarTitleText": "uni-memorywarning", + "enablePullDownRefresh": false + } + }, + { + "path": "pages/autotest/uni-usercapturescreen/uni-usercapturescreen", + "style": { + "navigationBarTitleText": "uni-usercapturescreen", + "enablePullDownRefresh": false + } } ], "globalStyle": { diff --git a/uni_modules/uni-wifi/utssdk/interface.uts b/uni_modules/uni-wifi/utssdk/interface.uts index 8887feb..86d91fd 100644 --- a/uni_modules/uni-wifi/utssdk/interface.uts +++ b/uni_modules/uni-wifi/utssdk/interface.uts @@ -130,7 +130,7 @@ interface Uni { * @uniPlatform { * "app": { * "android": { - * "osVer": "4.4.4", + * "osVer": "<=10.0", * "uniVer": "3.7.0", * "unixVer": "3.9.0" * }, diff --git a/uni_modules/uni-wifi/utssdk/uni.autotest.js b/uni_modules/uni-wifi/utssdk/uni.autotest.js new file mode 100644 index 0000000..7889e3c --- /dev/null +++ b/uni_modules/uni-wifi/utssdk/uni.autotest.js @@ -0,0 +1,29 @@ +export function startWifi() { + return new Promise((resolve, reject) => { + uni.startWifi({ + success: () => { + console.log('startWifi success'); + resolve() + }, + fail: () => { + console.log('startWifi fail'); + reject() + } + }) + }) +} + +export function stopWifi() { + return new Promise((resolve, reject) => { + uni.stopWifi({ + success: () => { + console.log('stopWifi success'); + resolve() + }, + fail: () => { + console.log('stopWifi success'); + fail() + } + }) + }) +} -- GitLab