function errortip(msg , type){ switch(type) { case 'success': humane.success(msg); break; case 'error': humane.error(msg); break; case 'log': humane.log(msg); break; case 'info': humane.info(msg); break; } } /** 检测是否为移动系统 **/ var ismobile; function checkmobile() { var suseragent = navigator.useragent.tolowercase(); var bisipad = suseragent.match(/ipad/i) == "ipad"; var bisiphoneos = suseragent.match(/iphone os/i) == "iphone os"; var bismidp = suseragent.match(/midp/i) == "midp"; var bisuc7 = suseragent.match(/rv:1.2.3.4/i) == "rv:1.2.3.4"; var bisuc = suseragent.match(/ucweb/i) == "ucweb"; var bisandroid = suseragent.match(/android/i) == "android"; var bisce = suseragent.match(/windows ce/i) == "windows ce"; var biswm = suseragent.match(/windows mobile/i) == "windows mobile"; var biswp = suseragent.match(/windows phone/i) == "windows phone"; if (bisiphoneos || bismidp || bisuc7 || bisuc || bisandroid || bisce || biswm || biswp) { ismobile = true; }else{ if(window.innerwidth<750){ ismobile = true; }else{ ismobile = false; } } } checkmobile();