BUI

其它版本:

API for BUI 1.6.x

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();
                                                

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:71

Available since 1.6.2

是否是Iphonex xs xr xsMax

Returns:

Boolean:

[true | false]

Example:

          var bool = bui.platform.isIphoneX();
                                                

isMac

() Boolean chainable

是否是mac平台

Returns:

Boolean:

[true | false]

Example:

          var bool = bui.platform.isMac();
                                                

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();