The execution of WeChat Mini Programs's Life cycle

is like this. At present, my Mini Program"s onshow and onload both execute the same logic. As for why it is because the logic should be loaded once at the beginning, but also when it is switched back, I would like to ask is there any way to execute it in a life cycle ?


now that it's all executed in onShow, onLoad doesn't need to be executed anymore. Because you need onShow after onLoad, why repeat it twice.

Menu