Mini App Document Mini App Document
  • Start
  • Configuration
  • Framework
  • Custom Components
  • Basic ability
  • Configuration
  • Interface
  • FXML syntax
  • FXS syntax
API
Components
IDE
  • Developer
  • Operator
  • Start
  • Configuration
  • Framework
  • Custom Components
  • Basic ability
  • Configuration
  • Interface
  • FXML syntax
  • FXS syntax
API
Components
IDE
  • Developer
  • Operator
  • API overview
  • Basics
  • Routing
    • switchTab
    • reLaunch
    • redirectTo
    • navigateTo
    • navigateBack
  • Jump
  • Forwarding
  • Interface
  • Network
  • Data caching
  • Media
  • Map
  • Location
  • File
  • Device
  • Canvas
  • FXML
  • Customize the menu
  • Other
  • API
2022-08-09
Directory

Routing

# switchTab

Base Library 1.3.9 is supported, iOS version 2.1.23, Android version 2.1.38

switchTab(Object object)

Jump to the tabBar page and close all other non-tabBar pages.

Parameters

Object object

Properties Type The default value is Required Description
url string Yes The path to the tabBar page that needs to be jumped (the page that needs to be defined in the tabBar field of app.json) cannot be followed by parameters.
success function No The interface calls the callback function successfully
fail function No The callback function that failed the interface callback function
complete function No The callback function at the end of the interface call (the call succeeds or fails)

Sample Code

# reLaunch

Base Library 1.3.9 is supported, iOS version 2.1.23, Android version 2.1.38

reLaunch(Object object)

Close all pages to a page within the app.

Parameters

Object object

Properties Type The default value is Required Description
url string Yes The in-app page path that needs to be jumped, followed by parameters. Parameters used between paths? Separated, parameter keys and parameter values are connected with =, different parameters are separated by &; For example, 'path?key=value&key2=value2'
success function No The interface calls the callback function successfully
fail function No The callback function that failed the interface callback function
complete function No The callback function at the end of the interface call (the call succeeds or fails)

Sample Code

# redirectTo

Base Library 1.3.9 is supported, iOS version 2.1.23, Android version 2.1.38

redirectTo(Object object)

Close the current page and jump to a page within the app.

Parameters

Object object

Properties Type The default value is Required Description
url string Yes The path to the non-tabBar page in the app that needs to be jumped, and the path can be followed by parameters. Parameters used between paths? Separated, parameter keys and parameter values are connected with =, different parameters are separated by &; For example, 'path?key=value&key2=value2'
success function No The interface calls the callback function successfully
fail function No The callback function that failed the interface callback function
complete function No The callback function at the end of the interface call (the call succeeds or fails)

Sample Code

# navigateTo

Base Library 1.3.9 is supported, iOS version 2.1.23, Android version 2.1.38

navigateTo(Object object)

Keep the current page and jump to a page within the app. You can use navigateBack to return to the original page.

Parameters

Object object

Properties Type The default value is Required Description
url string Yes The path (code package path) of the non-tabBar page within the app that needs to be jumped can be followed by parameters. Use ? between parameters and paths Separated, parameter keys are connected to parameter values with =, and different parameters are separated by &; For example, 'path?key=value&key2=value2'
events Object No An inter-page communication interface for listening for data sent to the current page by an open page. Base library 2.7.3 is starting to be supported.
success function No The interface calls the callback function successfully
fail function No The callback function that failed the interface callback function
complete function No The callback function at the end of the interface call (the call succeeds or fails)

object.success callback function

Parameters

Properties Type Description
eventChannel EventChannel Communicate with the opened page

Sample Code

# navigateBack

Base Library 1.3.9 is supported, iOS version 2.1.23, Android version 2.1.38

navigateBack(Object object)

Closes the current page to return to the previous page or multi-level page. You can get the current page stack by gettingCurrentPages() and decide how many layers you need to go back to.

Parameters

Object object

Properties Type The default value is Required Description
delta number No Returns the number of pages, or to the home page if delta is greater than the number of existing pages.
success function No The interface calls the callback function successfully
fail function No The callback function that failed the interface callback function
complete function No The callback function at the end of the interface call (the call succeeds or fails)

Sample Code

Last update: 2022/08/10, 11:46:43
Basics
Jump

← Basics Jump→

Copyright © 2020-2024 Neuxnet
  • Follow System
  • Light Mode
  • Dark Mode
  • Reading Mode