Life cycle - onBackPress() listens for page return
Function name
illustrate
Explanation of Platform Differences
onBackPress
Monitor the page return, return event = {from:backbutton, navigateBack}, backbutton means the source is the back button in the upper left corner or the android back key; navigateBack means the source is uni.navigateBack; detailed description and usage: onBackPress detailed explanation . The Alipay applet can only be triggered by a real machine, and can only monitor the return caused by non-navigateBack, and cannot prevent the default behavior.
app, H5, Alipay applet
Basic usage: pay attention to the return value options