微信小程序navigation跳转问题


<view>
  <navigator url="../index/index" open-type="navigate">跳转</navigator>
  <navigator url="../index/index" open-type="redirect">跳转</navigator>
  <navigator url="../index/index" open-type="switchTab">跳转</navigator>
</view>

navigator 导航的问题 导航分三种

  • a.open-type=“navigate” 打开新界面
  • b.open-type=“redirect” 在本界面中打开新界面
  • c.open-type=“switchTab” 控制tab页之间的切换

注意:

所有需要跳转链接的界面必须在app.json中注册

  1. a, b只能连接非tabBar中注册占用的页面,不能打开url="…/index/index",因为pages/index/index界面是tab页

  2. c只能打开app.json中注册过的tab页,也就是被tabBar注册的界面

猜你喜欢

转载自blog.csdn.net/david2000999/article/details/114800477
今日推荐