当前位置:网站首页>Wechat applet page Jump
Wechat applet page Jump
2022-04-22 23:48:00 【A tinkle】
Wechat applet has prepared a lot of for page Jump API, We can call different... In different situations API, Let me briefly introduce the common methods of page Jump .
1,navigateBack
Jump to the previous page . If there is now A,B Two pages , At first we were A page , And then we passed A Some operations of the page directly enter B page , At this time, we also want to start from B The page goes back to A page , It can be used directly navigateBack; Not only that, we can also return to his multi-level superior page , Just join A,B,C Three pages from A Direct to B, from B Direct to C, We can use this method directly from C Page jumps back to A or B page
wx.navigateBack({
delta:1// Go back to the previous page
//delta:2 // Return to the previous second page
})
2,navigateTo
Jump from one page to another , But you can't jump to tabBer page
wx.navigateTo({
url:" Page address "
})
3,switchTab
Jump to app.json Registered TabBer page
wx.switchTab({
url: 'page/index/index'
})
What we're talking about here is just our common way of centralized page Jump , But in the implementation of page Jump ( If used wx.navigateTo) When you do a page Jump , We will find that if the page we want to jump to is not under the same package, we will report an error and can't find the page


Let's explain here that we use wx.navigateTo When performing page Jump, it is in URL Address where he will automatically add the location of the current page before the jump address you write . This is sometimes inconvenient , So we can not write the address of the target address directly , The location of the target page can be represented in the following way
The first two points indicate going back to the previous folder , The following name indicates a package or a page under the page folder , above URL Express , First go back to the folder where this page is stored , And find the folder named index The file of , And in finding index The file named index.wxml The file of
I suggest we write a jump page URL You can jump to the address in the following way , It's safer
版权声明
本文为[A tinkle]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204222347154536.html
边栏推荐
- UVM源码解读,UVM-1.2 code review notes
- 物联网标识感知
- Hello, I want to open an account for crude oil futures. How can I open an account for futures safely and reliably?
- 51 单片机学习_4-2 数码管动态显示
- [dvcon2020] simulation acceleration method based on multithreaded UVM test platform
- FPGA(六)RTL代码之二(复杂电路设计1)
- [experience sharing] share mangopapa's paper learning experience
- [perseverance challenge] PCIe ask and answer every day (filed on February 2022)
- 北京航空航天大学开通CnOpenData试用
- 合并两个有序的数组
猜你喜欢

【newcoder】20220422周赛

"100 million" little technical feelings

LeetCode 1446 - 1449

Invite you to participate in the ume plug-in development competition

【DVCon2020】采用先进 Save & Restore 技术加速仿真周转时间 (Simulation Turnaround Time)
![[perseverance challenge] PCIe asks and answers every day (2022.04 in progress)](/img/15/a63bfcc74ee4c6f4154bc832472afb.png)
[perseverance challenge] PCIe asks and answers every day (2022.04 in progress)

北京航空航天大学开通CnOpenData试用
![[dvcon2020] software brothers shout: Hardware brothers, please be personal](/img/52/153bf53416f9f8af6a504b70283752.jpg)
[dvcon2020] software brothers shout: Hardware brothers, please be personal

在windows7下安装vs2017插件 GLSL language integration v0.10.120.vsix报错:microsoft.visualc.redist.12

【笔记】PCIe LTSSM 状态转移
随机推荐
居家第二十二天的绿豆芽
[dvcon2020] acceleration of low power design level verification based on signoff abstract model
"New programmer 003" was officially launched, and the cloud native and digital combat experience of 30 + companies such as Huawei and Alibaba
FPGA(五)RTL代码之一(跨时钟域设计)
Detailed explanation of SQL language
JS to traverse the array
【毅力挑战】PCIe 每日一问一答(2022.03 归档)
【DVCon2020】基于Signoff Abstract Model的低功耗设计层级验证加速
VI / VIM editor basic operation
网狐U3D客户端游戏配置加载失败Couldn‘t connect to server解决
Esp32 (GPIO) - GPIO learning (5)
unbuntu18.04 安装 gamit10.71 problem solution
物联网标识感知
Webrtc series - webrtc Foundation (VII) NAT, stun and turn (2)
Thread pool (easy to understand)
(MM-2018)用于行人重识别的局部卷积神经网络
How can Cassandra, an open source database giant, tell a "new story" in China without talking about the track and the tuyere
Conjugate gradients (3)
Invite you to participate in the ume plug-in development competition
Hello, I want to open an account for crude oil futures. How can I open an account for futures safely and reliably?
