Jump
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 | phizclip 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 phizclip App.onLaunch、App.onShow and Page.onLoad Callback function or small game pz.onShow Callback function pz.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 phizclip, 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 pz.onShow、pz.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
pz.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 phizclip
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 phizclip App.onLaunch、App.onShow and Page.onLoad Callback function or small game pz.onShow Callback function pz.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 phizclip to open. This parameter is valid only if the current phizclip is a development or trial version. If the current phizclip is an official version, the open phizclip 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
pz.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 phizclip, 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 pz.onShow、pz.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
pz.navigateBackMiniProgram({
extraData: {
foo: 'bar'
},
success(res) {
// Open success
}
})exitMiniProgram
pz.exitMiniProgram(Object object)
Exit the current phizclip. 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)) |