使用范围:UI2
Contents
class Network ($UI/system/api/native/network)
网络信息。
var network = require('$UI/system/api/native/network'); network.getNetworkType({ success : function(res) { alert(res.networkType); }, fail : function(res) { alert(JSON.stringify(res)); } });
Constructor Top
Network () |
Static Methods Top
void | getNetworkType (Object options) |
Constructor details
Top
public
Network
()
网络信息。
var network = require('$UI/system/api/native/network');
network.getNetworkType({
success : function(res) {
alert(res.networkType);
},
fail : function(res) {
alert(JSON.stringify(res));
}
});
public
Network
()
网络信息。
var network = require('$UI/system/api/native/network'); network.getNetworkType({ success : function(res) { alert(res.networkType); }, fail : function(res) { alert(JSON.stringify(res)); } });
Static Methods Detail Top
static
public
void
getNetworkType
(Object options)
得到当前的网络类型