HomeDocs
Skip to main content

dlt.navigateBack

Introduction​

dlt.navigateBack is an API used to close the current page and return to the previous page or multiple previous pages.

Parameters​

Object object​

PropertyTypeDefault ValueRequiredDescription
deltanumberNoThe number of pages to navigate back, starting from -1.
autoExitbooleanNoWhether to automatically exit the mini-program when navigating back to the last page.
paramsstringNoAdditional data in the form of an Object.
successfunctionNoCallback function for a successful API call.
failfunctionNoCallback function for a failed API call.
completefunctionNoCallback function that is called when the API call is complete (whether successful or not).

Example Code​

dlt.navigateBack({
delta: -1,
autoExit: true,
params: JSON.stringify({ a: 1 }),
success(res) {
console.log('success: ', res);
},
});
Privacy agreementDeveloper agreementcontact us: developer_private.mi@dlightek.com © 2024 MiniApp. All Rights Reserved.