大家好,又见面了,我是你们的朋友全栈君。
index.wxml
<swiper class="swiper" indicator-dots="true" autoplay="{
{flag}}" interval="5000" duration="1000">
<block wx:for="{
{movies}}" wx:for-index="index">
<swiper-item>
<image src="{
{item.url}}" class="slide-image" mode="aspectFill"/>
</swiper-item>
</block>
<swiper-item>
<video id="myVideo" src='http://wxsnsdy.tc.qq.com/105/20210/snsdyvideodownload?filekey=30280201010421301f0201690402534804102ca905ce620b1241b726bc41dcff44e00204012882540400&bizid=1023&hy=SH&fileparam=302c020101042530230204136ffd93020457e3c4ff02024ef202031e8d7f02030f42400204045a320a0201000400' bindtap="bofang" controls='true'></video>
</swiper-item>
index.js
Page({
data: {
movies: [
{ url: 'http://img04.tooopen.com/images/20130712/tooopen_17270713.jpg' },
{ url: 'file://192.168.203.1/%E5%85%B1%E4%BA%AB/Chrysanthemum.jpg' },
{ url: 'http://192.168.203.1/Chrysanthemum.jpg' }
]
}
index.wxss
.swiper {
height: 400rpx;
width: 100%;
}
.swiper image {
height: 100%;
width: 100%;
}
.swiper video {
height: 100%;
width: 100%;
}
发布者:全栈程序员-用户IM,转载请注明出处:https://javaforall.cn/143567.html原文链接:https://javaforall.cn
【正版授权,激活自己账号】: Jetbrains全家桶Ide使用,1年售后保障,每天仅需1毛
【官方授权 正版激活】: 官方授权 正版激活 支持Jetbrains家族下所有IDE 使用个人JB账号...