let isWx = function(){
    let u = navigator.userAgent.toLowerCase();
    if(!!u.match(/MicroMessenger/i)){
        return true;
    }else{
        return false;
    }
};
let isMobile = function(){
    if(/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)) {
        return true;
    } else {
        return false;
    }
};
let isIos = function(){
    let u = navigator.userAgent;
    if(!!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/i)){
        return true;                    
    }else{
        return false;
    }
};
let isAndroid = function(){
    let u = navigator.userAgent;
    if(u.indexOf('Android') > -1 || u.indexOf('Linux') > -1){
        return true;
    }else{
        return false;
    }
};
export default {
    isWx,
    isMobile,
    isIos,
    isAndroid,
}

