小程序扫码首次进入指定页面后,页面白屏,为什么?

小程序 文章 2022-01-25 10:40 569 0 全屏看文

AI助手支持GPT4.0

小程序扫码首次进入指定页面后,页面白屏,为什么?After the Mini Program scans the code and enters the specified page for the first time, the page is blank, why?

小程序扫码首次进入指定页面后,页面白屏,为什么?

微信通过扫小程序码进入领券页面后,首次进入,页面白屏,再次进入就好了。在首次进入白屏的时候,前端控制台没有错误,后端日志也没有错误,在页面的onShow里面会有页面loading,但是白屏状态下页面没有loading,推断白屏状况下没有进入页面的任何小程序生命周期, 请问有哪些可能的原因导致?

After wechat enters the coupon collecting page by scanning the small program code, it will enter the page for the first time, and the page will be blank. Just enter it again. When entering the white screen for the first time, there is no error in the front-end console and the back-end log. There will be page loading in Onshow of the page, but the page is not loaded in the white screen state. It is inferred that there is no applet life cycle of the page in the white screen state. What are the possible reasons?

回答:

Nolan麒:

试试onload

有赞:

用问题机型扫体验码,开启debug模式(右上角三个点图标),然后查看相关报错信息

Sakura:已收集到的反馈,跟机型没有关系,是偶现的,在debug打开的情况下,没有任何错误打印,后端接口在同一时间也没有错误日志,奇怪的是为什么onShow生命周期里面的loading也没有出现
brave:

自查代码逻辑。

Sakura:查过没有其他问题,如果有问题控制台会打印错误,而且只有首次白屏,再次进入就好了,现在首次扫码进入都没有走任何页面的生命周期,因为页面的onShow里面有loading也没有出现。

-EOF-

AI助手支持GPT4.0