function onLine(callback){
var img = new Image();
img.src = '/assets/img/img1.26736430.png';
img.onload=function(){
if (callback) callback(true)
};
img.onerror=function(){
if (callback) callback(false)
};
}
onLine(function(flag){
if(flag){
console.log('网络畅通')
}else{
console.log('网络故障')
}
})