Mini program wifi interface to get list data

Step 1: Open the wifi interface, and hang up the interface to get the wifi list after success

wx.startWifi({

success: function (res) {
        wx.getWifiList({
        })
      }
})

Step 2: Listen to the event (wx.getWifiList) when the Wi-Fi list data is obtained, and the wifiList data will be returned in the callback
wx.onGetWifiList( function (CALLBACK){
      var a = CALLBACK.wifiList;
      var showlist = that.data.showlist;
      that.setData({
        showlist:a
      })
      console.log(a);
    });

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324719815&siteId=291194637