file author : 王佳欣
 *  email interface Is { isWeibo : Function ; isWechat : Function ; isQQ : Function ; isQZone : Function ; isAndroid : Function ; isIos : Function ; isIphoneX : Function ; } export default ( ( ) : Is => { const USER_AGENT = navigator . userAgent . toLowerCase ( ) ; return { isWeibo ( ) { const isTest = /weibo/ . test ( USER_AGENT ) ; this . isWeibo = ( ) => isTest ; return isTest ; } , isWechat ( ) { const isTest = /micromessenger/ . test ( USER_AGENT ) && ! /wxwork/ . test ( USER_AGENT ) ; this . isWechat = ( ) => isTest ; return isTest ; } , isQQ ( ) { const isTest = /qq\//gi . test ( USER_AGENT ) ; this . isQQ = ( ) => isTest ; return isTest ; } , isQZone ( ) { const isTest = /qzone\//gi . test ( USER_AGENT ) ; this . isQZone = ( ) => isTest ; return isTest ; } , isAndroid ( ) { const isTest = /android/ . test ( USER_AGENT ) ; this . isAndroid = ( ) => isTest ; return isTest ; } , isIos ( ) { const isTest = /iphone|ipad|ipod/ . test ( USER_AGENT ) ; this . isIos = ( ) => isTest ; return isTest ; } , isIphoneX ( ) { const isTest = this . isIos ( ) && window . screen . width === 375 && window . screen . height === 812 ; this . isIphoneX = ( ) => isTest ; return isTest ; } } ; } ) ( ) ;