How to transfer parameters between pages by WeChat Mini Programs
This article mainly introduces the relevant knowledge of "how to transfer parameters between pages by WeChat Mini Programs". The editor shows you the operation process through an actual case. The method of operation is simple and fast, and it is practical. I hope this article "how to transfer parameters between pages by WeChat Mini Programs" can help you solve the problem.
Realize the effect picture:
WeChat Mini Programs passes parameters between two, similar to js passing url splicing parameters, for example.
Input sets its own parameters
/ / index.wxml give yourself a name and make sure to reset formSubmit:function (e) {var da = e.detail.value; var qu = da.uesrname; this.setData ({username:qu}), wx.navigateTo ({url:'. / logs/logs?uesrname='+qu / / qu is the value entered by input above})})}
Logs.js
/ logs.js Page ({data: {motto: 'Hello', userInfo: {}, answer: stringAns, uesrname:'' / / set the received variables}, onLoad: function (option) {this.setData ({uesrname:option.uesrname})}, this is the end of the introduction on "how to transfer parameters between pages by WeChat Mini Programs". Thank you for reading. If you want to know more about the industry, you can follow the industry information channel. The editor will update different knowledge points for you every day.