Weex Android return key

I currently have three pages
this is the first page



index

The result of

test shows that when
clicks in for the first time, you can return
layer by layer. The more times you click in, the more times you call the listenReturn method when you return the key

.

I want to implement. Click the Android return key to exit the application on the home page of app, and return to the previous route on other pages. The problem above
has been solved for a long time, but it has not been successful.

ask for advice.

I would like to post a complete solution and code, thank you very much!

Mar.03,2021

you have been monitoring and registering many times. Every time you click the return key, you will register an event monitor, and the corresponding event will be executed several times


I put listenReturn on the first page I wrote, I don't know why, but I do have the problem of multiple calls; later, I put listenReturn in the entry index.vue under src; just

Menu