In the actual project, click the bottom navigation, jump to a different page, and the corresponding button plus the active class name, change its background map
PC, Android back to all wood has a problem, but the top left corner of the Apple phone when you click the Back button when the active does not toggle and the bottom background image that needs to change after returning from the previous page is missing.
The feeling is that the Apple phone reused the previous page, and did not refresh the page, and no longer reload JS
Solution: A In the click of a link at the end of the #wechat_redirect so that the picture resources will reload, but the active still have to switch
b Add the following code on the page, the return must be loaded after JS put in
Window.onpageshow=function (e) { if (e.persisted) { console.log (' AA ') }};
The last feeling is more repetitive, there is a better way please advise, common progress, thank you!!
The upper left corner of the Apple phone button returns not refreshed