openPanel(params: Object)

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);
}

Description

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

Parameters

PropertyTypeRequiredDescription
deviceIdstringYesDevice info ID
NoAdditional panel info When navigating to a secondary panel, the extra information that must be provided
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);
  },
});