当前位置:网站首页>Five page Jump methods for wechat applet learning
Five page Jump methods for wechat applet learning
2022-06-27 09:08:00 【. Bemoan】
The first one is :<navigator></navigator> label .
This is the most common way to jump , amount to html Inside a label . But it should be noted that This method cannot jump tabbar page .
The format is :
<navigator url="........"></navigator>The second kind :wx.navigateTo.
By construction js function , Calling this interface in the function can realize the effect of page Jump . However, the interface cannot jump tabbar page . There is a small return arrow in the upper left corner after the jump , Click to return to the original page .
The format is :
<view class="select_calculator" bindtap="next_calculator">next_calculator:function () {
wx.navigateTo({
url: '/pages/calculator/calculator',
})
},
The third kind of :wx.redirectTo.
Close current page , Jump to a page in the app ( Can't jump tabbar page ). Be similar to html Medium window.open('.....');
After the jump, a small return arrow appears in the upper left corner , Click to return to the original page .
A fourth :wx.switchTab.
Jump to tabBar page , And shut down all the others tabBar page ; This method can only jump tabbar page .
for example :


js:
post_calculator:function () {
wx.switchTab({
url: '/pages/calculator/calculator',
})
},
})The fifth :wx.reLaunch.
Close all pages , Open to a page in the app .
Follow wx.redirectTo The return arrow will not appear in the upper left corner , But they are not exactly the same ;
边栏推荐
- IO pin configuration and pinctrl drive
- 今日3大面试Demo[Integer ASCII 类关系]
- Internal class ~ lock ~ access modifier
- Preliminary understanding of pytorch
- 浏览器的markdown插件显示不了图片
- Apache POI的读写
- 直接修改/etc/crontab 文件内容,定时任务不生效
- Today's three interviews demo[integer ASCII class relationship]
- 我大抵是卷上瘾了,横竖睡不着!竟让一个Bug,搞我两次!
- The markdown plug-in of the browser cannot display the picture
猜你喜欢

有關二叉樹的一些練習題

Correctly understand MySQL mvcc

Some exercises about binary tree

Improving efficiency or increasing costs, how should developers understand pair programming?

即构「畅直播」,全链路升级的一站式直播服务

我大抵是卷上瘾了,横竖睡不着!竟让一个Bug,搞我两次!

Five basic types of redis

Nosql 数据库 -Redis 安装

JVM common garbage collector

MATLAB小技巧(19)矩阵分析--主成分分析
随机推荐
2022.6.26-----leetcode. seven hundred and ten
RockerMQ消息发送模式
粗读DS-TransUNet: Dual Swin Transformer U-Net for Medical Image Segmentation
看看volatile你深知多少
Some exercises about binary tree
Several cases that do not initialize classes
手把手带你玩摄像头模组
提高效率 Or 增加成本,开发人员应如何理解结对编程?
Correctly understand MySQL mvcc
Understanding mvcc in MySQL transactions is super simple
C# 解决使用SQLite 的相对路径问题
Rockermq message sending mode
[cloud native] 2.3 kubernetes core practice (Part 1)
[vivid understanding] the meanings of various evaluation indicators commonly used in deep learning TP, FP, TN, FN, IOU and accuracy
Design of multiple classes
webrtc入门:12.Kurento下的RtpEndpoint和WebrtcEndpoint
[original] typescript string UTF-8 encoding and decoding
orthofinder直系同源蛋白分析及结果处理
AQS underlying source code of concurrent programming JUC
Demand visual Engineer