收藏
回答

wx.miniProgram.navigateTo 跳转5次后失效

框架类型 问题类型 API/组件名称 终端类型 操作系统 微信版本 基础库版本
小程序 Bug wx.miniProgram.navigateTo 客户端 6.7.0 2.0.0





使用 wx.miniProgram.navigateTo 从网页跳回小程序界面,前四次能够正常跳转,,第5次跳转就失效了。谁知道这个问题怎么解决


改为  wx.miniProgram.navigateBack 也是相同的状况。

<script>
$(function() {
$('#btn').on('click', function(s) {
console.log("weiwei:");
wx.miniProgram.navigateTo({
url: '/pages/index/index?test=testtest',
success: function() {
console.log('success')
},
fail: function() {
console.log('fail');
},
complete: function() {
console.log('complete');
}

});
});

});

%09%09%09%2F*%20eslint-disable%20*%2F%09%09%09%24(function()%20%7B%09%09%09%09%24(%26%2339%3B%23btn%26%2339%3B).on(%26%2339%3Bclick%26%2339%3B%2C%20function(s)%20%7B%09%09%09%09%09console.log(%26quot%3Bweiwei%3A%26quot%3B)%3B%09%09%09%09%09wx.miniProgram.navigateTo(%7B%09%09%09%09%09%09url%3A%20%26%2339%3B%2Fpages%2Findex%2Findex%3Ftest%3Dtesttest%26%2339%3B%2C%09%09%09%09%09%09success%3A%20function()%20%7B%09%09%09%09%09%09%09console.log(%26%2339%3Bsuccess%26%2339%3B)%09%09%09%09%09%09%7D%2C%09%09%09%09%09%09fail%3A%20function()%20%7B%09%09%09%09%09%09%09console.log(%26%2339%3Bfail%26%2339%3B)%3B%09%09%09%09%09%09%7D%2C%09%09%09%09%09%09complete%3A%20function()%20%7B%09%09%09%09%09%09%09console.log(%26%2339%3Bcomplete%26%2339%3B)%3B%09%09%09%09%09%09%7D%09%09%09%09%09%7D)%3B%09%09%09%09%7D)%3B%09%09%09%7D)%3B%09%09%2509%2509%2509%252F*%2520eslint-disable%2520*%252F%2509%2509%2509%2524(function()%2520%257B%2509%2509%2509%2509%2524(%2526%252339%253B%2523btn%2526%252339%253B).on(%2526%252339%253Bclick%2526%252339%253B%252C%2520function(s)%2520%257B%2509%2509%2509%2509%2509console.log(%2526quot%253Bweiwei%253A%2526quot%253B)%253B%2509%2509%2509%2509%2509wx.miniProgram.navigateBack(%257B%2509%2509%2509%2509%2509%2509url%253A%2520%2526%252339%253B%252Fpages%252Findex%252Findex%253Ftest%253Dtesttest%2526%252339%253B%252C%2509%2509%2509%2509%2509%2509success%253A%2520function()%2520%257B%2509%2509%2509%2509%2509%2509%2509console.log(%2526%252339%253Bsuccess%2526%252339%253B)%2509%2509%2509%2509%2509%2509%257D%252C%2509%2509%2509%2509%2509%2509fail%253A%2520function()%2520%257B%2509%2509%2509%2509%2509%2509%2509console.log(%2526%252339%253Bfail%2526%252339%253B)%253B%2509%2509%2509%2509%2509%2509%257D%252C%2509%2509%2509%2509%2509%2509complete%253A%2520function()%2520%257B%2509%2509%2509%2509%2509%2509%2509console.log(%2526%252339%253Bcomplete%2526%252339%253B)%253B%2509%2509%2509%2509%2509%2509%257D%2509%2509%2509%2509%2509%257D)%253B%2509%2509%2509%2509%257D)%253B%2509%2509%2509%257D)%253B%2509%2509</script>



最后一次编辑于  2018-07-13
回答关注问题邀请回答
收藏

3 个回答

  • 兔头
    兔头
    2018-07-17

    配合使用navigateBack 和redirectTo

    2018-07-17
    有用
    回复
  • 一鹏
    一鹏
    2018-07-13

    注意:目前页面路径最多只能十层


    2018-07-13
    有用
    回复 2
    • 王福军
      王福军
      2018-07-13

      操作过程是,从小程序调到页面,再跳回来,反复4次,就挂了,这个过程怎么控制层次。


      2018-07-13
      回复
    • 王福军
      王福军
      2018-07-17

      试过了,原来都不可以,现在微信升级了基础库,这个问题好了

      谢谢各位

      2018-07-17
      回复
  • 王福军
    王福军
    2018-07-13

    第四次是看到log 中由 (node)warning: possible EventEmitter momory leak detected.16 listeners added.Use emitter.setMaxListeners() to increase limit.

    2018-07-13
    有用
    回复
登录 后发表内容