In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-15 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 transmission by WeChat Mini Programs". The content of the explanation in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought and go deep into it slowly. Let's study and learn "how WeChat Mini Programs can achieve dynamic parameters"!
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 written in the local data, and it also corresponds 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
Thank you for your reading. the above is the content of "how to dynamically transfer parameters by WeChat Mini Programs". After the study of this article, I believe you have a deeper understanding of how WeChat Mini Programs can achieve dynamic transmission of parameters. The specific use of the situation also needs to be verified by practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
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.