Uniapp implements the method of returning data from the jump page: first pass the id to the click event; then write the method in Methods, the code is [uni.navigateTo({url:'opportunity-form?id=' id})]; Finally, receive parameters on the details page.
The operating environment of this tutorial: windows7 system, uni-app2.5.1 version, DELL G3 computer. This method is suitable for all brands of computers.
Recommended (free): uni-app development tutorial
uniapp implements jump page postback Data method:
First introduce the most original jump method, which is similar to the a tag in html, but in uniapp you need to replace the a tag with <navigator url='jump Transfer address'>...</navigator>
Let’s focus on the method of jumping to pass value
1. Pass in the id to the click event
1 |
|
2. Write methods in Methods
1 2 3 4 5 |
|
3. Receive parameters on the details page
Write an onLoad function
1 2 |
|
Receive method for object parameters
1 2 |
|
The reception of a single parameter is introduced here using id
First of all, the passed id must be assigned a value
Request interface, the url address of the interface must be followed by the passed id id【/${this.id}/】
The complete steps are as follows:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
|
Related free learning recommendations: Programming video
The above is the detailed content of How uniapp implements jump page to return data. For more information, please follow other related articles on the PHP Chinese website!