openPanel

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

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

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

Description

Open a panel, regardless of whether it’s an RN panel or a panel miniapp

Parameters

PropertyTypeRequiredDescriptionMinimum SDK versions
deviceIdstringYesDevice info ID—
NoAdditional panel info When navigating to a secondary panel, the extra information that must be provided—
initialPropsRecord<string, Record<string, any>>NoPanel launch parameters carrying business data—
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 { openPanel } from '@ray-js/ray'

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