My friends who have been following our hands-on series of tutorials should have a certain understanding of the basic content of the applet. Today, we are going to learn a comprehensive case: express delivery query. Project requirements: 1. the applet displays a courier query page 2. enter the courier order number to view the order process. My friends who have been following our hands-on series of tutorials should have a certain understanding of the basic content of the applet. Today, we are going to learn a comprehensive case: express delivery query. Project requirements:
1. the applet displays a courier query page
2. enter the express order number to view the order process.
Code implementation:
1. create a small program project for express delivery query, as shown below:
The index. wxml code is as follows:
3. add an input box on the homepage. How to add an input box? You can go to the api official website and find the applet development documentation-component-form component-input box ). As shown in:
Copy the graphic code to our page. the code is as follows:
After running the command, we will find that the homepage already has a certain input box, as shown in.
We will find that the color of this input box is invisible. we will add a style to this input box. The index. wxss style code is as follows:
input { border: 1px solid red; width: 90%; margin: 5%; padding: 5px; }
Next, we will add a query button on the homepage. How can I add a query button? Applet development documentation --- component -- form component --- button, refer to the official example, we add code on the wxml page
Query
Save the following page after debugging:
Initiate network requests through official APIs
More small program development: for articles related to express delivery query, please follow the PHP Chinese network!