When WeChat Mini Programs first entered the page, wx.showLoading did not display on the real machine.

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?


onLoad and onReady are in order, but that time is almost negligible.

Picture from official document-Life cycle
clipboard.png


if the request is fast enough, you just can't see it. I don't think you should write it in the request callback, it should be written after rendering. You write this now, request to come back, and it hasn't been rendered to the page. Loading has gone down


simulator. There is a preview on the simulator. Do not hideLoading, the first wave of ShowLoading to see if you can see it, and then Hide

when you come out.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b371c7-2c084.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b371c7-2c084.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?