收藏
回答

微信小程序页面栈问题?

除了通过wx.reLaunch可以清空页面栈,有没有可以手动删除页面栈的方法



回答关注问题邀请回答
收藏

3 个回答

  • 禾店短剧系统
    禾店短剧系统
    2021-06-18

    var backlen = history.length - 1;

                            history.go(-backlen); // Return at the beginning

                            history.replaceState({}, null, '../index.html');

       在vue的页面中需要加一个定时器

        setTimeout(function(){

        var backlen = history.length - 1;

                            history.go(-backlen); // Return at the beginning

                            history.replaceState({}, null, '你重定向的页面路径');

    2021-06-18
    有用 1
    回复
  • L
    L
    2019-11-15

    我也想问 这个问题  splice 不行

    2019-11-15
    有用
    回复
  • .
    .
    2019-11-15

    每跳转到下一个页面的时候使用wx.redirectTo进行跳转


    2019-11-15
    有用
    回复 1
    • 7
      7
      2020-01-04
      这个不中啊老哥
      2020-01-04
      回复
登录 后发表内容
问题标签