In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "how to realize dynamic parameter transfer in WeChat Mini Programs". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Next, let the editor take you to learn "how to realize dynamic parameter transmission in WeChat Mini Programs".
Detailed explanation of the example of WeChat Mini Programs's dynamic transmission of parameters
Jump here use navigator jump, add parameters to the link of navigator jump to:
Index.wxml (pass parameters according to the click on the page)
{item.MTId}} {{item.status}}
Id is already written in local data, and see previous blogs, which also correspond to other details of each piece of data. As a result, we can imagine that we only need to query the local data according to the passed parameter id on the next page, and then display the query results to achieve the function of loading details.
Logs.js (accepts the parameters passed by index.wxml and handles them)
Page ({onLoad: function (options) {console.log (options.id) var init = myData.searchmtdata (options.id) this.setData ({data_MTId: init.MTId, data_status: init.status, data_duration: init.Duration, data_Operator: init.Operator, data_IdleReason: init.IdleReason})})
The method of searchmtdata has been explained in previous blogs, which is to query according to the value of id and return the details of a specific object in list, that is, an item.
The onLoad:function function is executed once when the page is loaded, and options is the parameter that is received from index.wxml. When a specific list object is queried according to id and then assigned, the data in data_** is the details of an item.
Logs.wxml (display the details of item)
MTID {{data_MTId}} Status {{data_status}} Duration {{data_duration}} Operator {{data_Operator}} IdleReason {{data_IdleReason}}
Screenshot of the implementation effect:
Click on a specific item
At this point, I believe you have a deeper understanding of "how to realize dynamic parameter transfer in WeChat Mini Programs". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
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.