I have heard an elder say that request should be put in onReady and then request after rendering dom. I don"t know what advantage this will bring. Won"t it be slower than putting it in onload? Ask for answers from seniors
I have heard an elder say that request should be put in onReady and then request after rendering dom. I don"t know what advantage this will bring. Won"t it be slower than putting it in onload? Ask for answers from seniors
is usually placed in onload, and the data is obtained at the beginning of the page loading. If you need to return to this page and load the data, wrap it up and call it in onshow. Here's what I did
I don't think there is a fixed answer to this. It depends on your own needs. OnReady is not much slower than onLoad.
as for your elder's opinion, you'd better ask him.
it is better to put it in onload, where the request and rendering are carried out at the same time.
onShowonLoad
Previous: H5 embedded nail micro-application map api call was not successful
Next: What custom form plug-ins have you used? Like a lightning strike net?
set the click event for a button to call wx.authorize,. If the user clicks the rejection of the authorization pop-up box for the first time, won t the authorization pop-up box be adjusted the next time the button is clicked? ...
according to the title, my Mini Program mainly has a form submission to get the user unionid to get through Mini Program and the official account. Do I need to maintain my login status? When it comes to the login state, it makes me feel dizzy. ...
when Mini Program sends template messages to obtain access_token, appsecret, needs to be passed in the API parameters, but what we are doing is a third-party platform for saas service. How can we get the merchant s appsecret? Can merchants get appsecret...
I bound the same click event to the button tags of some child pages, such as getFormID, so I put getFormID in app.js. Sub-page button binding click event when the direct bindtap= "getFormID " can not be executed, prompting that there is no getFormID met...
because I want to collect formid (multiple pushes of template messages), I put layers button and form around each navigator ...
the official document says: "in order to facilitate developers of third-party platforms to introduce extAppid development and debugging work, it is necessary to introduce the concept of ext.json. Ext.json is a configuration file that is placed in the r...
I found that when I wrote Mini Program, I tested it on my ios mobile phone. The map on the first page can not be opened by writing wx.openLocation directly, while the map in the other sub-page can be opened by writing wx.openLocation directly. Why? (neit...
does Mini Program, a template developed by a third-party platform, need to be checked and launched like a normal Mini Program? Or only third-party platforms can only replace merchants to audit their Mini Program online? ...
my wx.showLoading is placed in the onload lifecycle function, and the wx.hideLoading is written in the request callback function, but it will be displayed when the simulator first enters the page. Why does it not appear on the phone? ...
I set the width of the picture, and then set the mode= "widthfix ", but I found that on some phones, the moment when I first enter the page to load the image, the picture will be pulled very long, and then return to normal. Then if I set the height of t...
I see that the official document only says that web-view requires a basic library of at least 1.6.4, so how much is the basic library needed for web-view to open official account articles? Do you need to be compatible? ...
setting hover-class for navigator and button does not work, but setting for view does. My navigator and button both have background colors. Does that have anything to do with this? ...
it is found that after setting the background color of Mini Program s button component (without setting the type type), the default button-hover when clicked does not take effect. Is there any solution? ...
large text should be better to use text, after all, text can be selected, so small text such as only a few words, view or text is better? ...
the official document says: the picture is loaded lazily. It is only valid for image under page and scroll-view. Then I only wrote a few image tags on the page, set lazy-load, and then scrolling the page didn t feel effective. What should be the effect ...
Mini Program comes with a rich-text component, but what s the difference between seeing that some people introduce wxparse to parse rich text? Isn t it more convenient to bring your own rich-text? Or does rich-text have many shortcomings? ...