菜鸟潇淼顾
菜鸟潇淼顾
  • 发布:2019-11-01 09:45
  • 更新:2019-11-01 09:49
  • 阅读:1041

【报Bug】重复调用getCurrentPage方法 必定引发小程序崩溃闪退!!!

分类:uni-app

此方法getCurrentPages(),只要重复调用数次以上,必定引起小程序崩溃闪退

[QQ]594311692

情况1
onLoad() {
console.log(getCurrentPages());
console.log(getCurrentPages());
console.log(getCurrentPages());
console.log(getCurrentPages());
console.log(getCurrentPages());
console.log(getCurrentPages());
console.log(getCurrentPages());
console.log(getCurrentPages());
console.log(getCurrentPages());
console.log(getCurrentPages());
console.log(getCurrentPages());
},

情况2
onShow() {
console.log(getCurrentPages());
},
情况2最恶心,在页面来回切换数次后,相当于就是不断重复执行了console.log(getCurrentPages());此方法,必定造成小程序崩溃闪退

我寻思着一个获取路由信息的方法而已,为什么只能在onload里调用一次。。。多调用几次就会造成小程序崩溃呢。。郁闷。盘查我一天了!!!!!!

2019-11-01 09:45 负责人:无 分享
已邀请:
菜鸟潇淼顾

菜鸟潇淼顾 (作者)

qq 594391692

该问题目前已经被锁定, 无法添加新回复