基础
环境 / getAccountInfoSync
- develop 开发版
- trial 体验版
- release 正式版
canIUse
{API}.${method}.${param}.${options}
${component}.${attribute}.${option}
js
// 判断接口及其参数在宿主环境是否可用
wx.canIUse("openBluetoothAdapter");
wx.canIUse("getSystemInfoSync.return.screenWidth");
// 判断组件及其属性在宿主环境是否可用
wx.canIUse("contact-button");
wx.canIUse("text.selectable");
wx.canIUse("button.open-type.contact");