bui.platform Class
仅用于安卓及ios移动平台的检测
Item Index
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
是否是全面屏 Iphonex xs xr xsMax 更新到iphone14promax
Returns:
Boolean:
[true | false]
Example:
var bool = bui.platform.isIphoneX();
isLink
()
Boolean
chainable
LINK应用
Returns:
Boolean:
[true | false]
Example:
var bool = bui.platform.isLink();
isMac
()
Boolean
chainable
是否是mac平台
Returns:
Boolean:
[true | false]
Example:
var bool = bui.platform.isMac();
isMobile
()
Boolean
chainable
是否是移动端, 包含, 安卓,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();