微信小程序左上角返回按钮跳转到指定页面

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_35713752/article/details/82424780

在当前页面的 onUnload 执行页面跳转

  onUnload: function () {
    wx.reLaunch({
      url: '../logs/logs'
    })
  },

代码讲解:监听页面卸载的函数,把页面重定向到指定的 页面;

猜你喜欢

转载自blog.csdn.net/qq_35713752/article/details/82424780