API
The framework provides rich WeChat native APIs, which can easily invoke the capabilities provided by WeChat, such as obtaining user information, local storage, and payment functions.
illustrate:
- The API at the beginning of wx.on is an API interface that monitors the occurrence of an event and accepts a CALLBACK function as a parameter. When this event fires, the CALLBACK function is called.
- Unless otherwise agreed, other API interfaces accept an OBJECT as a parameter.
- OBJECT can specify
success
,fail
,complete
to receive the interface call result. - api