微信小程序轮播图
有勇气的牛排
1721
微信开发
2021-08-26 21:57:34
知止自律打卡-微信小程序APP
一款微信自律打卡小程序,支持自定义打卡项目、习惯记录、项目日记、专注计时与数据统计。自律打卡、学习打卡、读书打卡、健身打卡、运动打卡、减肥打卡、戒色打卡、养生打卡、戒烟、戒酒、戒熬夜等多种场景。万能打卡模板自由创建。可自定义每日打卡目标,记录习惯连续天数,可视化追踪成长进度。
了解产品详情 →
微信搜索「知止自律打卡」
1 index.html
< view>
< swiper class="swiper" indicator-dots="true" autoplay="true" interval="5000" duration="1000">
< block wx:for-items="{{swiperImage}}" wx:key="key">
< swiper-item>
< image src="{{item.url}}" style="width:100%;height:100%" class="slide-image" mode="aspectFill" />
< /swiper-item>
< /block>
< /swiper>
< /view>
2 index.js
data: {
data: {
swiperImage: [
{ url: 'https://www.couragesteak.com/tcos/article/pe/swiper/swiper3.jpg' },
{ url: 'https://www.couragesteak.com/tcos/article/pe/swiper/swiper2.jpg' },
{ url: 'https://www.couragesteak.com/tcos/article/pe/swiper/swiper1.jpg' }
],
},
<h2><a id="1_indexhtml_0"></a>1 index.html</h2>
<pre><div class="hljs"><code class="lang-html">< view>
< swiper class="swiper" indicator-dots="true" autoplay="true" interval="5000" duration="1000">
< block wx:for-items="{{swiperImage}}" wx:key="key">
< swiper-item>
< image src="{{item.url}}" style="width:100%;height:100%" class="slide-image" mode="aspectFill" />
< /swiper-item>
< /block>
< /swiper>
< /view>
</code></div></pre>
<h2><a id="2_indexjs_12"></a>2 index.js</h2>
<pre><div class="hljs"><code class="lang-js"><span class="hljs-attr">data</span>: {
<span class="hljs-attr">data</span>: {
<span class="hljs-attr">swiperImage</span>: [
{ <span class="hljs-attr">url</span>: <span class="hljs-string">'https://www.couragesteak.com/tcos/article/pe/swiper/swiper3.jpg'</span> },
{ <span class="hljs-attr">url</span>: <span class="hljs-string">'https://www.couragesteak.com/tcos/article/pe/swiper/swiper2.jpg'</span> },
{ <span class="hljs-attr">url</span>: <span class="hljs-string">'https://www.couragesteak.com/tcos/article/pe/swiper/swiper1.jpg'</span> }
],
},
</code></div></pre>
评论区