Get the App
SLTechnology News&Howtos  ›  Development  › 

How to transfer parameters between pages by WeChat Mini Programs

Shulou Source: shulou.com Published: 2022-05-31 21:20:10 10月03日 Update

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.

Tags: Between programs pages knowledge parameters industries different practical two individual cases content variables names practicality actual effects effect drawings articles methods more Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno macOS NVidia Docker Xiaomi