
module.exports = {
    isWeiXin() {
      const ua = navigator.userAgent.toLowerCase();
      return ua.indexOf('micromessenger') > 0;
    },
    isWorkWx (){
     return  /wxwork/i.test(navigator.userAgent)
    },
    isAlipay() {
      const ua = navigator.userAgent.toLowerCase();
      return ua.indexOf('aliapp') > 0 || ua.indexOf('alipay') > 0;
    },
  
    isXiaoMaiApp() {
      const ua = navigator.userAgent.toLowerCase();
      return ua.match(/xiaomai_ios/i) === 'xiaomai_ios' || ua.match(/xiaomai_android/i) === 'xiaomai_android';
    },
  
    isXiaoMaiIOSApp() {
      const ua = navigator.userAgent.toLowerCase();
      return ua.match(/xiaomai_ios/i) === 'xiaomai_ios';
    },
  
    isXiaoMaiAndroidApp() {
      const ua = navigator.userAgent.toLowerCase();
      return ua.match(/xiaomai_android/i) === 'xiaomai_android';
    },
  
    isAndroid() {
      const ua = navigator.userAgent.toLowerCase();
      return /android/i.test(ua);
    },
    isIOS() {
      const ua = navigator.userAgent.toLowerCase();
      return /iphone|ipad|ipod/i.test(ua);
    },
    isMeiKe() {
      const ua = navigator.userAgent.toLowerCase();
      return /xmappc/i.test(ua);
    },
    isMac() {
      const ua = navigator.platform.toLowerCase();
      return ua.indexOf("mac") > 0
    }
  };
  