import Vue from 'vue' export const isServer: boolean = Vue.prototype.$isServer export function isAndroid(): boolean { return isServer ? false : /android/.test(navigator.userAgent.toLowerCase()); } export function isIOS(): boolean { return isServer ? false : /ios|iphone|ipad|ipod/.test(navigator.userAgent.toLowerCase()); } export function isApp(): boolean { return navigator.userAgent.includes('qcjtype') } export function getClientInfo () : { width: number, height: number } { const width = document.documentElement.clientWidth || document.body.clientWidth const height = document.documentElement.clientHeight || document.body.clientHeight return { width, height } }