小程序使用onPageNotFound监控当前是否有该页面

类似于webApp的404页面
在这里插入图片描述

  onPageNotFound(res){
    
    
    wx.switchTab({
    
    
      url: 'pages/index/index',
    })
  },

猜你喜欢

转载自blog.csdn.net/hql1024/article/details/107492492
今日推荐