- wx.connectWifi(Object object)连WIFI,弹窗不可以隐藏或取消吗?
使用API wx.connectWifi(Object object) 连WIFI时,弹窗一直显示 微信连WIFI··· 无法取消,导致用户无法进行后续操作。 Connected: function() { console.log("Connected"); var that=this; var connect_timer; that.timers = 0; connect_timer = setInterval(function(){ that.timers++; wx.connectWifi({ SSID: "ATBM_AP", password: "12345678", success: function(res) { wx.hideLoading(); wx.showToast({ title: 'wifi连接成功', }) clearInterval(connect_timer); that.ap_touch_send(); }, fail: function(res) { if(that.timers == 20) { wx.showToast({ title: 'wifi连接失败', }) clearInterval(connect_timer); } } }) },2000) },
2020-04-28 - 微信消息小程序可以使用npm 的UDP吗?
install i udp 可以支持吗?
2020-03-17 - 微信小程序可以使用 npm i udp 吗?
npm i udp 的使用 const dgram = require('dgram');
2020-03-17 - 为什么UDP 不可以发包呢?
startDiscovery:function() { console.log('startDiscovery') var that = this; var i = 0,j; const udp = wx.createUDPSocket() udp.bind(7777) while(1) { var now = Date.now(); for(i = 0;i<40000;i++) { for(j = 0;j<40000;j++) { } } var end = Date.now(); console.log("timer = " + (end-now)) udp.send({ address: '255.255.255.255', port: 8848, message: 'hello,how are you' }) } }
2020-03-13 - UDPSocket.onError 返回的errmsg 有错误说明吗?
[图片] udp 返回这个错误是什么原因造成的
2020-03-07 - UDPSocket.onError 返回的errmsg 有错误说明吗?
[图片] 可能是什么原因造成的?是因为发送的太快了吗?
2020-03-05 - UDP 在调试模式下是可以发送接收包的,在预览模式下就不可以发送和接收包 是什么原因?
const udp = wx.createUDPSocket() udp.bind(3333) setInterval(function(){ udp.send({ address: '224.0.0.251', port: 9999, message: "hello world!" }); },1000);
2020-03-05 - UDP 预览不可以发送吗?
const app = getApp() Page({ startDiscovery:function() { console.log('startDiscovery') var that = this; that.udpSocket = wx.createUDPSocket(); that.udpSocket.bind(3333); setInterval(function(){ that.udpSocket.send({ address: '192.168.2.106', port: 9999, message: "hello world!" }); },2000); } })
2020-03-04 - UDPSocket.onMessage 无法接收消息?
UDPSocket.onMessage 在不先调用 UDPSocket.send 无法接受消息that.udpSocket = wx.createUDPSocket(); that.udpSocket.bind(35675); that.udpSocket.send({ address: '192.168.1.120', port: 54321, message: "hello world!" }); that.udpSocket.onListening(function(res) { console.log(res); }); that.udpSocket.onMessage(function(res) { console.log(res.message); console.log(res.remoteInfo.address); console.log(res.remoteInfo.port); console.log(res.remoteInfo.size); }); //基础库2.10.2
2020-03-04 - UDP 无法组播bug
that.udpSocket = wx.createUDPSocket(); that.udpSocket.bind(6666); that.udpSocket.send({ address: '234.255.255.1', port: 3779, message: 'hello, how are you' }) 基础库 2.10.2
2020-02-28