As shown in the picture, WeChat Mini Programs and page, why can't you call the method on this page?

Feb.28,2021

suggest you take a good look at Mini Program's api document.
1. OnLoad is the lifecycle function of Mini Program, indicating the methods that can be executed after the Mini Program page is loaded. Generally, other methods are defined to be executed in onLoad.
2. If you call the methods in Mini Program, you should use this.onLoad ()


call as follows:

this.onload()
Menu