mp_navigate
Navigate between pages in WeChat Mini Programs using methods like navigateTo, redirectTo, reLaunch, switchTab, and navigateBack for automated page transitions during development.
Instructions
在小程序内导航,支持 navigateTo、redirectTo、reLaunch、switchTab 和 navigateBack。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| connection | No | ||
| path | No | ||
| query | No | ||
| transition | No | navigateTo | |
| waitMs | No |
Input Schema (JSON Schema)
{
"properties": {
"connection": {
"additionalProperties": false,
"properties": {
"account": {
"minLength": 1,
"type": "string"
},
"args": {
"anyOf": [
{
"type": "string"
},
{
"items": {
"type": "string"
},
"type": "array"
},
{
"not": {}
}
]
},
"autoClose": {
"type": "boolean"
},
"cliPath": {
"minLength": 1,
"type": "string"
},
"cwd": {
"minLength": 1,
"type": "string"
},
"mode": {
"enum": [
"launch",
"connect"
],
"type": "string"
},
"port": {
"exclusiveMinimum": 0,
"type": "integer"
},
"projectPath": {
"minLength": 1,
"type": "string"
},
"ticket": {
"minLength": 1,
"type": "string"
},
"timeout": {
"exclusiveMinimum": 0,
"type": "integer"
},
"trustProject": {
"type": "boolean"
},
"wsEndpoint": {
"minLength": 1,
"type": "string"
}
},
"type": "object"
},
"path": {
"minLength": 1,
"type": "string"
},
"query": {
"additionalProperties": {
"type": "string"
},
"type": "object"
},
"transition": {
"default": "navigateTo",
"enum": [
"navigateTo",
"redirectTo",
"reLaunch",
"switchTab",
"navigateBack"
],
"type": "string"
},
"waitMs": {
"minimum": 0,
"type": "integer"
}
},
"type": "object"
}