data-* 相当于数据存储,点击了点击方法,就会读取里面的数据,进行页面跳转
<view class="bar" wx:for="{{list}}" wx:key="video" data-url="{{item.url}}" bindtap="playVideo">
<image src="../../image/video.jpg"></image>
<text>{{item.title}}</text>
</view>
list: [{
id: 1,
title: "测试第一个",
url: "http://wxsnsdy.tc.qq.com/105/20210/snsdyvideodownload?filekey=30280201010421301f0201690402534804102ca905ce620b1241b726bc41dcff44e00204012882540400&bizid=1023&hy=SH&fileparam=302c020101042530230204136ffd93020457e3c4ff02024ef202031e8d7f02030f42400204045a320a0201000400"
},
{
id: 2,
title: "测试第二个",
url: "https://www.w3school.com.cn//i/movie.mp4"
},
{
id: 3,
title: "测试第三个",
url: "http://wxsnsdy.tc.qq.com/105/20210/snsdyvideodownload?filekey=30280201010421301f0201690402534804102ca905ce620b1241b726bc41dcff44e00204012882540400&bizid=1023&hy=SH&fileparam=302c020101042530230204136ffd93020457e3c4ff02024ef202031e8d7f02030f42400204045a320a0201000400"
},
{
id: 4,
title: "测试第四个",
url: "https://www.w3school.com.cn//i/movie.mp4"
},
]