```javascript
isiOS() { //ios
var isiOS;
var u = navigator.userAgent;
isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
return isiOS;
},
isAndroid(){ //安卓
var isAndroid;
var u = navigator.userAgent;
isAndroid = u.indexOf('Android') > -1 || u.indexOf('adr') > -1
}