小程序连接Wifi

wxml

`<button bindtap="startWifi">打卡wifi</button>`

js

`wx.startWifi({
  success:function(){
    wx.getConnectedWifi({
        success(res){
            console.log(res)
        },
        fail(err){
            console.log(err)
        }
    })
    wx.connectWifi({
        SSID:'',    //wifi名称
        password:'',    //wifi密码
        success(res){
            console.log(res)
            wx.getConnectedWifi({
                success(res){
                    console.log(res)
                },
                fail(err){
                    console.log(err)
                }
            })
        },
        fail(err){
            console.log(err)
        }
    })`