Skip to content

获取环境信息

方法名

getMetaInfos

用法

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

回调

  • 示例
    json
    {
      "data": {
        "result": "{\"deviceType\":\"android\",\"appVersion\":\"1.0.1\",\"appName\":\"uni.app.UNI26CE205\",\"bioMetaInfo\":\"7.1.5:393216,0\",\"apdidToken\":\"0E7WDrhoWDoZYv2dPIsGVzEXgJAvD4GUayLJmbfqMFUhgRqMngEAAA==\",\"sessionId\":\"087e369e8e1a48feaa80b6ed6ab1e789\",\"zimVer\":\"1.0.0\",\"zoomSupport\":\"Y\",\"osVersion\":\"16\",\"nfcSupport\":\"Y\",\"deepSecVersion\":\"P8.0.0.20260116\",\"deviceModel\":\"ELP-AN00\",\"sdkVersion\":\"2.3.48\",\"securityVersion\":\"2\",\"securityChannel\":\"mpaas\",\"guardVersion\":\"A.10057.2.F\",\"whiteBalanceSupport\":\"Y\",\"voiceSdkVersion\":\"1.0.0\"}"
      },
      "message": "",
      "code": 0
    }
  • 回调说明:
    参数名参数类型参数描述
    messageString消息提示
    dataObject数据对象
    data.resultString获取结果,获取的结果为JSON字符串,可以通过JSON.parse转换为JSON
    codeInteger返回类型,0.成功,其他:失败