Show:

bui.platform Class

仅用于安卓及ios移动平台的检测

Methods

isAndroid

() Boolean chainable

是否是安卓手机

Returns:

Boolean:

[true | false]

Example:

          var bool = bui.platform.isAndroid();
                                                

isBingotouch

() Boolean chainable

BT应用

Returns:

Boolean:

[true | false]

Example:

          var bool = bui.platform.isBingotouch();
                                                

isIE

() Boolean chainable

是否在ie

Returns:

Boolean:

[true | false]

Example:

          var bool = bui.platform.isIE();
                                                

isIos

() Boolean chainable

IOS平台包括Iphone Ipad

Returns:

Boolean:

[true | false]

Example:

          var bool = bui.platform.isIos();
                                                

isIpad

() Boolean chainable

是否是Ipad

Returns:

Boolean:

[true | false]

Example:

          var bool = bui.platform.isIpad();
                                                

isIphone

() Boolean chainable

是否是Iphone

Returns:

Boolean:

[true | false]

Example:

          var bool = bui.platform.isIphone();
                                                

isIphoneFull

() Boolean chainable

是否是Iphone 全面屏 ,通过条件宽松些,可能会有误判

Returns:

Boolean:

[true | false]

Example:

          var bool = bui.platform.isIphoneFull();
                                                

isIphoneX

() Boolean chainable

Defined in src/scripts/method/bui.platform.js:101

Available since 1.6.2

是否是全面屏 Iphonex xs xr xsMax 更新到iphone14promax

Returns:

Boolean:

[true | false]

Example:

          var bool = bui.platform.isIphoneX();
                                                

isMac

() Boolean chainable

是否是mac平台

Returns:

Boolean:

[true | false]

Example:

          var bool = bui.platform.isMac();
                                                

isMobile

() Boolean chainable

Defined in src/scripts/method/bui.platform.js:60

Available since 1.6.4

是否是移动端, 包含, 安卓,iphone, ipad 等都算移动端

Returns:

Boolean:

[true | false]

Example:

          var bool = bui.platform.isMobile();
                                                

isPC

() Boolean chainable

是否是PC;

Returns:

Boolean:

[true | false]

Example:

          var bool = bui.platform.isPC();
                                                

isWeiXin

() Boolean chainable

微信浏览器

Returns:

Boolean:

[true | false]

Example:

          var bool = bui.platform.isWeiXin();
                                                

isWeiXinMini

() Boolean chainable

微信小程序环境

Returns:

Boolean:

[true | false]

Example:

          var bool = bui.platform.isWeiXinMini();
                                                

isWindow

() Boolean chainable

是否是window平台

Returns:

Boolean:

[true | false]

Example:

          var bool = bui.platform.isWindow();