Skip to content

获取激活码信息

方法名

getLicenseData

用法

  • 用法如下:
    js
    module.getLicenseData({
      complete: (res) => {
        this.writeLog(JSON.stringify(res))
      }
    })
    js
    module.getLicenseData({
      complete: (res : LevenResult) => {
        this.writeLog(JSON.stringify(res))
      }
    } as LevenOptions)
  • 参数说明
    参数名参数类型是否必填默认值参数描述
    successFunction执行成功的函数
    failFunction执行失败的函数
    completeFunction执行完成的函数,不管成功还是失败都会执行

回调

  • 示例
    json
    {
      "data": {
        "algorithmId": 3,
        "deviceId": "11140C1F12FEEB2C52DFBEA35335271512",
        "expireTime": 1730908799,
        "functionList": "nir_feature live_feature id_feature nir_live visual_live depth_live face_attr face_gaze rgbd_feature driver_behavior ",
        "packageName": "",
        "md5": "",
        "licenseKey": ""
      },
      "message": "",
      "code": 0
    }
  • 回调说明:
    参数名参数类型参数描述
    messageString消息提示
    dataObject数据对象
    data.algorithmIdInteger算法Id
    data.deviceIdString指纹数据
    data.expireTimeInteger过期时间
    data.functionListString可用函数列表
    data.packageNameString应用包名
    data.md5Stringmd5值
    data.licenseKeyString秘钥
    codeInteger返回类型,0.成功,其他:失败