The applet implements rolling Message notification, while the applet implements rolling Message notification.
This article provides examples to share with you the code for implementing rolling messages by using applets for your reference. The specific content is as follows:
:
Index. wxml
<!--index.wxml--><swiper class="swiper_container" vertical="true" autoplay="true" circular="true" interval="1000"> <block wx:for="{{msgList}}"> <navigator url="/pages/index/index?title={{item.url}}" open-type="navigate"> <swiper-item> <view class="swiper_item">{{item.title}}</view> </swiper-item> </navigator> </block></swiper>
Index. js
// Index. js // obtain the application instance var app = getApp () Page ({data :{}, onLoad (e) {console. log (e. title) this. setData ({msgList: [{url: "url", title: "popular cities with high interest rates for first home loans in multiple regions are gradually welcoming the zero discount age" },{ url: "url", title: "If you have paid domestic roaming charges for more than 20 years, how much will you save? "},{ Url:" url ", title:" "}]}) ;}})
Index. wxss
/**index.wxss**/.swiper_container { background-color: red; height: 50rpx; width: 80vw;}.swiper_item { font-size: 30rpx; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}
The above is all the content of this article. I hope it will be helpful for your learning and support for helping customers.