Mini Program home page is a transit page to jump to other pages, mobile preview can only enter once, the second time can not enter.

The

home page is a transit page, get a value from the server, and then jump to the corresponding page according to this value. And then I found the problem. No matter using navigatorTo or redirecTo, mobile phone to scan the code, you can enter it for the first time, but you won"t jump the second time. Then a new project is created, the code is minimized for testing, and the onLoad is then redirected. It is also found that the second code scan can only enter the transit page, not the jump. Although continuous code scanning is not possible for users, because users enter from Mini Program"s list for the second time (this is no problem), for developers, this is embarrassing and cannot be tested by themselves. Have you ever met?


after getting the value in onload, jump in the onshow method. Have you tried this method?


it feels like there is something wrong with the logic of the transit page to which you scan the code, otherwise it is impossible not to jump.
you can remove the logic and jump directly to a page. In this way, no matter how many times you scan, you can dance.

in addition, please refer to
the second developed by Mini Program (routing interception design)

Menu