微信小程序api视频课程-路由-wx.reLaunch(重启动)的使用

版权声明:黄菊华 https://blog.csdn.net/u013818205/article/details/88655946

wxml代码

关闭所有页面,打开到应用内的某个页面

<button bindtap="tz01">reLaunch01</button>

<button bindtap="tz02">reLaunch02</button>

<navigator url="/pages/index/index2" open-type='reLaunch'>跳转</navigator>

js代码

  /**
   * 页面的初始数据
   */
  data: {

  },
  tz01:function(){
    wx.reLaunch({
      url: '/pages/01jichu/navigateBack?a=1&b=2',
    })
  },
  tz02: function () {
    wx.reLaunch({
      url: '/pages/index/index2',
    })
  },

欢迎大家收看我的视频教程:微信小程序常用API使用
https://edu.csdn.net/course/detail/16194
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/u013818205/article/details/88655946