const apiUrls = 'http://192.168.1.110:8006/openapi'
function checkInternetConnectiongw () {
  var xhr = new XMLHttpRequest()
  xhr.open('GET', apiUrls, true)
  xhr.onreadystatechange = function () {
    if (xhr.readyState === 4) {
      if (xhr.status >= 200 && xhr.status < 300) {
        console.log('可以访问外网')
      } else {
        console.log('无法访问外网')
      }
    }
  }
  xhr.send()
}

module.exports = {
  checkInternetConnectiongw
}
