Skip to main content

bn.navigateToMiniProgram

navigateToMiniProgram(options): Promise<void>

description Opens another Mini Program

example

bn.navigateToMiniProgram({  appId: '',  path: 'page/1',  extraData: {    foo: 'bar',  },  envVersion: 'published',  type: 'app',  rev: '006a05ebf14db3e4a8e69cb6bc8b2589',})

Parameters

NameTypeDescription
optionsNavigateToMiniProgramOptionsNavigate to options

Returns

Promise<void>


Interface: NavigateToMiniProgramOptions#

NameTypeDescription
type?NavigationMPTypeThe type of the Mini Program to be opened. It is valid when target="miniProgram"
appIdstringThe appId of the Mini Program to be opened
rev?stringThe rev of the Mini Program to be opened. It is valid when target="miniProgram"
envVersion?NavigationMPChannelThe channel of the Mini Program to be opened. It is valid when target="miniProgram"
extraData?ObjectThe data that needs to be passed to the target Mini Program. The target Mini Program can obtain this data from App.onLaunch and App.onShow
path?stringThe path of the page to be opened. If it is empty, the homepage is opened. Content following the question mark (?) in the path becomes a query
mpModalType?"replace"description behavior type of the current app after navigateToMiniProgram is calledremark supported jssdk >= 4.3.0. only support "replace" by now. With this type, the app where navigateToMiniProgram is called will be closed