In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the relevant knowledge of how to achieve page jump and parameter transfer in WeChat Mini Programs, the content is detailed and easy to understand, the operation is simple and fast, and it has a certain reference value. I believe you will have something to gain after reading this WeChat Mini Programs article on how to achieve page jump and parameter transfer. Let's take a look.
The realization of WeChat Mini Programs's Page Jump and Parameter transfer
Foreword:
The jump in WeChat Mini Programs is actually similar to the hyperlink an in html. We can achieve the jump through tags or through js. Let's demonstrate it one by one below.
Before showing demo, we need to simply set up the project folder and get ready. As follows:
Label implementation
Mini Program has a navigator tag similar to the a tag, which is used for jump processing.
Index page:
Jump to a new page jump to the current page
Navigator pages and redirect pages:
{{title}}
Navigator.js pages and redirect.js pages:
Page ({data: {title:''}, onLoad:function (options) {/ / parameters brought by page initialization options for page jump this.setData ({title:options.title}),})
The jump is also divided into two types, one is to jump to the path behind the new page url and can carry parameters, the other is to add redirect after the page, open in the current page, and carry parameters.
Note: in order not to cause trouble for users when using Mini Program, we stipulate that the page path can only be five layers, please try to avoid multi-level interaction.
Tips: don't forget to configure the page you jump to in app.json, otherwise you will report an error.
2. Js implementation
To implement it with js, you only need to write the jump code, and others are as above.
Wx.navigateTo ({url:'.. / navigator/navigator?title= I am navi'}) wx.redirectTo ({url:'.. / redirect/redirect?title= I am red'})
Tips: if you take a closer look at the picture below, you will find that jumping to another page will have a back button, but not when you open it on the current page.
Picture display:
This is the end of the article on "how to achieve page jump and parameter transfer in WeChat Mini Programs". Thank you for reading! I believe that everyone has a certain understanding of the knowledge of "how to achieve page jump and parameter transfer in WeChat Mini Programs". If you want to learn more knowledge, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.