判断当前是否联网

使用说明

客户端 Android iOS
支持说明 支持 支持
YLSDK.Network.hasNetwork().then(res => {
  if (res) {
    console.log('已联网');
  } else {
    console.log('未联网');
  }
});

返回说明

Promise类型 说明
resolve 已联网:true, 未联网:false
reject 操作失败的原因

results matching ""

    No results matching ""