# Navigation

navigateToMiniProgram(Object object)

Opens another Mini-Program.

Parameters

Object object

Property Type Default Required Description
appId string Yes The appId of the Mini-Program to open.
path string No The page path to open. If empty, the homepage will be opened. The part after ? in the path becomes the query, which can be obtained in the callback functions App.onLaunch, App.onShow, and Page.onLoad of the Mini-Program, or in the ft.onShow callback function and ft.getLaunchOptionsSync of the Mini-Game. For Mini-Games, you can pass only the query part to achieve parameter passing, e.g., pass "?foo=bar".
extraData Object No Data to be passed to the target Mini-Program. The target Mini-Program can obtain this data in App.onLaunch and App.onShow. If navigating to a Mini-Game, this data can be obtained in ft.onShow and ft.getLaunchOptionsSync.
success function No Callback function for successful API call.
fail function No Callback function for failed API call.
complete function No Callback function for API call completion (executed regardless of success or failure).

Example

ft.navigateToMiniProgram({
  appId: '',
 path: 'page/index/index?id=123',
  extraData: {
    foo: 'bar'
  },
  success(res) {
    // Opened successfully
  }
})

Supported since Base Library 3.0.42, iOS SDK 2.40.7, Android SDK 2.40.7

navigateToWechatMiniProgram(Object object)

Navigates to open a WeChat Mini-Program.

Parameters

Object object

Property Type Default Required Description
originId string Yes Original ID.
path string No The page path to open. If empty, the homepage will be opened. The part after ? in the path becomes the query, which can be obtained in the callback functions App.onLaunch, App.onShow, and Page.onLoad of the Mini-Program, or in the ft.onShow callback function and ft.getLaunchOptionsSync of the Mini-Game. For Mini-Games, you can pass only the query part to achieve parameter passing, e.g., pass "?foo=bar".
envVersion String release No The version of the Mini-Program to open. This parameter is only valid when the current Mini-Program is a development version or trial version. If the current Mini-Program is a release version, the opened Mini-Program will always be the release version.

Valid Values for object.envVersion

Value Description Minimum Version
develop Development Version
trial Trial Version
release Release Version

Example

ft.navigateToWechatMiniProgram({
  originId: '',
  path: 'page/index/index?id=123'
})

# exitMiniProgram

ft.exitMiniProgram(Object object)

Exits the current Mini-Program. Must be triggered by a click action to succeed.

Parameters

Object object

Property Type Default Required Description
success function No Callback function for successful API call.
fail function No Callback function for failed API call.
complete function No Callback function for API call completion (executed regardless of success or failure).
© FinClip with ❤ , Since 2017