What is a mini program: A mini program is an application that can be used without downloading or installing. It realizes the dream of having an application "at your fingertips". Users can open the application by scanning or searching. It also embodies the concept of “use and go”, and users do not care about installing too many applications. Applications will be ubiquitous and available anytime, anywhere without the need to install or uninstall. As Zhang Xiaolong, the father of WeChat, announced that the mini program will be opened on January 9. The era of mini programs is here. We have compiled the "Qianfeng Education WeChat Mini Program Development Video Tutorial" in the hope that everyone can understand WeChat mini programs as quickly as possible.
Course playback address: //m.sbmmt.com/course/242.html
The teacher’s teaching style:
The teacher’s lectures are simple, clear, layer-by-layer analysis, interlocking, rigorous argumentation, rigorous structure, and use the logical power of thinking to attract students’ attention Strength, use reason to control the classroom teaching process. By listening to the teacher's lectures, students not only learn knowledge, but also receive training in thinking, and are also influenced and infected by the teacher's rigorous academic attitude
The more difficult point in this video is the interaction of WeChat applet events :
The official document of the mini program defines events as:
-Events are the communication method from the view layer to the logic layer
-Events can change the user's behavior Feedback to the logic layer for processing
-Events can be bound to components. When the trigger event is reached, the corresponding event processing function in the logic layer will be executed.
- Event objects can carry additional information, such as id, dataset, touches.
We can see from here that the official document mainly uses events for processing user interaction behaviors in mini programs, that is, communication from the view layer (WXML) to the logic layer (Page), and the logic layer receives these After the user behavior event, business processing can be carried out, and then the results can be fed back to the user or not according to the situation.
Okay, let’s put aside other uses of events today, and specifically talk about the use of events between the view layer and the logic layer.
Generally speaking, the working principle of the event mechanism in the mini program is consistent with the event mechanism of the HTML DOM. In HTML, we can bind the user's page click event handler by setting an attribute such as onclick="clickHandler(event)" on the HTML element. In WXML, we bind an event handling function to a component, which can be done using the following syntax!
The above is the detailed content of Qianfeng Education WeChat applet development video tutorial resource introduction. For more information, please follow other related articles on the PHP Chinese website!