检查JSAPI权限


接口说明

支持版本>=10.0.2

JSAPI权限校验

HWH5.canIUse

请求参数

参数 类型 必填 说明
schema Array 需要检查权限项列表

返回说明

参数 说明
data 权限对象

请求示例

  • ES6版本
  HWH5.canIUse({
    schema: ['fetch', 'faceVerification']
  }).then(data => {
    console.log(data);
  }).catch(error => {
    console.log(error);
  });
  • ES5版本
  HWH5.canIUse({
    schema: ['fetch', 'faceVerification']
  }).then(function (data) {
    console.log(data);
  }).catch(function (error) {
    console.log('获取权限异常', error);
  });

result. ""

    Not Found. ""