提交 06350ede 编写于 作者: 杜庆泉's avatar 杜庆泉

修复wifi 插件部分问题

上级 fb8b6823
......@@ -9,6 +9,8 @@
<button @tap="testConnnectWifi" style="width: 100%;">链接wifi</button>
<button @tap="testStopWifi" style="width: 100%;">关闭wifi模块</button>
<button @tap="onGetWifiList2_assert0" style="width: 100%;">onGetWifiList2_assert0</button>
<button @tap="testScreenShotListen">开启截屏监听</button>
<button @tap="testScreenShotOff">关闭截屏监听</button>
<button @tap="testSetUserCaptureScreen">{{setUserCaptureScreenText}}</button>
......@@ -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({
......
......@@ -539,6 +539,8 @@ export function onGetWifiList(callback : UTSCallback) {
*/
export function offGetWifiList(callback? : UTSCallback) {
Global.onGetWifiListCallback = null
Global.supendGetWifiComplete = null
Global.supendGetWifiSuccess = null
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册