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
}
posted on 2024-12-16 09:41  AtlasLapetos  阅读(10)  评论(0)    收藏  举报