Detailed example of list refresh realized by wechat applet

Wechat applet list refresh:

Wechat applet recently learned the knowledge of wechat applet and wanted to realize the list refresh, pull-down refresh, pull-up load and other functions of app.

Open the interface first

1.wx. Request (get the data of the remote server, which can be understood as $. Ajax)

2. Two events of scroll view

2.1 bindscrolltower (when sliding to the bottom of the page)

2.2 bindscroll (when the page slides)

2.3 bindscrolltoupper (when sliding down the top of the page)

Then we look at the code and describe it in detail.

index. js

index. wxml

Thank you for reading, hope to help you, thank you for your support to this site!

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>