获取网络状态:wx.getNetworkTypebtnclick:function(){ wx.getNetworkType({ success:function(res){ console.log(res); }; }); }