preloadPanel

Requires:
BizKit≥3.0.0@ray-js/ray≥0.3.23
Platforms:
iOSAndroid
import { preloadPanel } from '@ray-js/ray';

// Promise usage
try {
  const res = await preloadPanel({ ...params });
  console.log(res);
} catch (err) {
  console.log(err.errorMsg);
}

Method signature
preloadPanel(params: )
Minimum SDK versions
iOSThingSmartBizKitBizBundle
≥ 5.2.1
Androidcom.thingclips.smart:thingsmart-bizbundle-bizkit
≥ 5.2.0

Description

Pre-download panel

Parameters

PropertyTypeRequiredDescriptionMinimum SDK versions
deviceIdstringYesDevice ID—
NoAdditional panel info When pre-downloading a secondary panel, extra info that must be provided—
complete() => voidNoCompletion callback (executed on both success and failure)—
success() => voidNoCallback on successful API call—
fail(params: Object) => voidNoFailure callback—
fail callback parameters
PropertyTypeDescription
errorMsgstringError message
errorCodestring | numberError code
Error extension

Return Value

None

Examples

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

preloadPanel({
  deviceId: "xx",
  success: data => {
    console.log(data);
  },
  fail: error => {
    console.error(error);
  },
});