微信小程序设置左上角返回键跳转到特定界面

微信小程序返回键跳转到指定页面,需要通过在onUnload函数中跳转,

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

reLaunch 可以打开任意页面。onUnload函数为监听页面卸载的函数,把页面重定向到指定的页面;

发布了89 篇原创文章 · 获赞 207 · 访问量 2万+

猜你喜欢

转载自blog.csdn.net/weixin_43729943/article/details/105498670
今日推荐