Appearance
Navigate
navigateToMiniProgram
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
attribute | type | Default values | Required | Introductions |
---|---|---|---|---|
appId | string | yes | Mini Program to open appId | |
path | string | no | Open 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 " | |
extraData | Object | no | Data 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 | |
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) |
sample code
javascript
ft.navigateToMiniProgram({
appId: '',
path: 'page/index/index?id=123',
extraData: {
foo: 'bar'
},
success(res) {
// Open success
}
})
navigateToWechatMiniProgram
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
attribute | type | Default values | Required | Introductions |
---|---|---|---|---|
originId | string | yes | origin Id | |
path | string | no | Open 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 " 。 | |
envVersion | String | release | no | The 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. |
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) |
object.envVersion Legal value
value | Introductions |
---|---|
develop | Development version |
trial | Experience version |
release | Official version |
sample code
javascript
ft.navigateToWechatMiniProgram({
originId: '',
path: 'page/index/index?id=123'
})
navigateBackMiniProgram
Base library support from 1.3.9, iOS version 2.1.23, Android version 2.1.38
navigateBackMiniProgram(Object object)
parameter
Object object
attribute | type | Default values | Required | Introductions |
---|---|---|---|---|
extraData | Object | {} | no | Data 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 |
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) |
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
attribute | type | Default values | Required | Introductions |
---|---|---|---|---|
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)) |
restartMiniProgram
ft.restartMiniProgram(Object object)
Restart current mini program
parameter
Object object
attribute | type | Default values | Required | Introductions |
---|
| 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)) |