getAppInfo

版本要求:
BizKit≥3.0.0@ray-js/ray≥0.3.23
支持平台:
iOSAndroid
import { getAppInfo } from '@ray-js/ray';

// Promise 调用
try {
  const res = await getAppInfo();
  console.log(res);
} catch (err) {
  console.log(err.errorMsg);
}

方法签名
getAppInfo(params: )
SDK 最低版本
iOSThingSmartBizKitBizBundle
≥ 5.2.1
Androidcom.thingclips.smart:thingsmart-bizbundle-bizkit
≥ 5.2.0

描述

拿到当前App的业务信息

参数

属性类型必填说明
complete() => void否接口调用结束的回调函数(调用成功、失败都会执行)
success(params: Object) => void否接口调用成功的回调函数
fail(params: Object) => void否接口调用失败的回调函数
success 回调参数
属性类型说明BizKit 最低版本SDK 最低版本
serverTimestampnumberserverTimestamp 云端时间戳v3.1.2—
appVersionstringappVersion app版本v3.1.2—
languagestringlanguage app语言包v3.1.2—
countryCodestring国家码,返回国家或地区电话区号字符串 返回示例:countryCode: "86"(中国大陆)v3.1.2—
regionCodestring区域服务码,取值来自当前网络区域或用户域配置 在 RN API 中对应 service 字段 返回示例:regionCode: "AY"(中国区)v3.1.2—
appNamestringappName app名称v3.1.2—
appIconstringappIcon app图标v3.1.2—
appEnvnumberapp环境 0: 日常 1: 预发 2: 线上v3.1.2—
appBundleIdstringapp包名v3.1.2—
appSchemestringapp schemev3.1.2—
appIdstringapp idv3.2.2—
clientIdstringapp clientIdv4.2.0
iOSThingSmartBizKitBizBundle
≥ 5.8.0
Androidcom.thingclips.smart:thingsmart-bizbundle-bizkit
≥ 5.8.0
accessibilityModeboolean是否打开无障碍模式v4.27.1
iOSThingSmartBizKitBizBundle
≥ 7.5.0
Androidcom.thingclips.smart:thingsmart-bizbundle-bizkit
≥ 7.5.0
fail 回调参数
属性类型说明
errorMsgstring错误信息
errorCodestring | number错误码
错误扩展

返回值

无

示例代码

import { getAppInfo } from '@ray-js/ray'

getAppInfo({
  success: data => {
    console.log(data);
  },
  fail: error => {
    console.error(error);
  },
});