canlUse
canlUse ^6.8
获取某个 API 在当前版本是否可用
#请求参数
| Prop | Type | Required | Default | Comment | 
|---|---|---|---|---|
| params | String | Y | N/A | 接口 url | 
#接口调用示例
let params = "getSystemInfo";
this.$bridge
  .canIUse(params)
  .then((res) => {
    this.$alert(res);
  })
  .catch((err) => {
    this.$toast(err);
  });
#返回参数
- 成功时返回
| Prop | Type | Comment | 
|---|---|---|
| enable | Boolean | 是否支持该接口:`true | 
- 失败时返回(api 为空或者没有)
| Prop | Type | Comment | 
|---|---|---|
| code | Number | -2 | 
| msg | String | json 解析失败 | 
#返回示例
{
  "enabled": true //true or false
}
 
                    
                 
 
                
            
         浙公网安备 33010602011771号
浙公网安备 33010602011771号