Skip to content

Navigate

Base library support from 1.3.9, iOS version 2.1.23, Android version 2.1.38

navigateToMiniProgram(Object object)

Open another little program

parameter

Object object

attributetypeDefault valuesRequiredIntroductions
appIdstringyesMini Program to open appId
pathstringnoOpen page path, if empty then open the home page. path in The latter part will become Query, in the Mini Programs App.onLaunch、App.onShow and Page.onLoad Callback function or small game ft.onShow Callback function ft.getLaunchOptionsSync Can be obtained from query Data. For small games, you can just pass query Part, to achieve the pass parameter effect, such as: pass "foo=bar "
extraDataObjectnoData that needs to be passed to the target Mini Program, which can be found in the App.onLaunch,App.onShow To get this data in the. If the jump is a small game, you can in ft.onShow、ft.getLaunchOptionsSync This data is available in
successfunctionnoInterface calls the successful callback function
failfunctionnoInterface calls failed callback functions
completefunctionnoCallback function at the end of an interface call (both successful and unsuccessful calls are executed)

sample code

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

Base library support from 3.0.42 , iOS version 2.40.7, Android version 2.40.7

navigateToWechatMiniProgram(Object object)

Open wechat mini program

parameter

Object object

attributetypeDefault valuesRequiredIntroductions
originIdstringyesorigin Id
pathstringnoOpen page path, if empty then open the home page. path in The latter part will become Query, in the Mini Programs App.onLaunch、App.onShow and Page.onLoad Callback function or small game wx.onShow Callback functionwx.getLaunchOptionsSync Can be obtained from query Data. For small games, you can just pass query Part, to achieve the pass parameter effect, such as: pass "foo=bar " 。
envVersionStringreleasenoThe version of the Mini Program to open. This parameter is valid only if the current Mini Program is a development or trial version. If the current Mini Program is an official version, the open Mini Program must be the official version.
successfunctionnoInterface calls the successful callback function
failfunctionnoInterface calls failed callback functions
completefunctionnoCallback function at the end of an interface call (both successful and unsuccessful calls are executed)

object.envVersion Legal value

valueIntroductions
developDevelopment version
trialExperience version
releaseOfficial version

sample code

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

Base library support from 1.3.9, iOS version 2.1.23, Android version 2.1.38

navigateBackMiniProgram(Object object)

parameter

Object object

attributetypeDefault valuesRequiredIntroductions
extraDataObject{}noData that needs to be passed to the target Mini Program, which can be found in the App.onLaunch,App.onShow To get this data in the. If the jump is a small game, you can in ft.onShow、ft.getLaunchOptionsSync This data is available in
successfunctionnoInterface calls the successful callback function
failfunctionnoInterface calls failed callback functions
completefunctionnoCallback function at the end of an interface call (both successful and unsuccessful calls are executed)

sample code

javascript
ft.navigateBackMiniProgram({
  extraData: {
    foo: 'bar'
  },
  success(res) {
  // Open success
  }
})

exitMiniProgram

ft.exitMiniProgram(Object object)

Exit the current Mini Program. Click behavior is required for the call to succeed

parameter

Object object

attributetypeDefault valuesRequiredIntroductions
successfunctionnoInterface calls the successful callback function
failfunctionnoInterface calls failed callback functions
completefunctionnoCallback function at the end of an interface call (both successful and unsuccessful calls are executed))

restartMiniProgram

ft.restartMiniProgram(Object object)

Restart current mini program

parameter

Object object

attributetypeDefault valuesRequiredIntroductions

| path | string | | yes | The path to the opened page, where a query can be added | | success | function | | no | Interface calls the successful callback function | | fail | function | | no | Interface calls failed callback functions | | complete | function | | no | Callback function at the end of an interface call (both successful and unsuccessful calls are executed)) |