Commit ee284484 by 高淑倩

modify: 会员中心轮播图数据展示

parent 9ab0a80a
......@@ -15,17 +15,13 @@ Component({
},
},
attached () {
// console.log('this.data', this.data)
console.log('this.data', this.data)
},
/**
* 组件的初始数据
*/
data: {
imgUrls: [
'https://images.unsplash.com/photo-1551334787-21e6bd3ab135?w=640',
'https://images.unsplash.com/photo-1551214012-84f95e060dee?w=640',
'https://images.unsplash.com/photo-1551446591-142875a901a1?w=640'
],
imgUrls: [],
indicatorDots: true,
autoplay: true,
interval: 5000,
......@@ -35,13 +31,13 @@ Component({
* 组件的方法列表
*/
methods: {
preview() {
wx.previewImage({
current: 'https://images.unsplash.com/photo-1551334787-21e6bd3ab135?w=640', // 当前显示图片的http链接
urls: ['https://images.unsplash.com/photo-1551334787-21e6bd3ab135?w=640',
'https://images.unsplash.com/photo-1551214012-84f95e060dee?w=640',
'https://images.unsplash.com/photo-1551446591-142875a901a1?w=640'] // 需要预览的图片http链接列表
})
}
// preview() {
// wx.previewImage({
// current: 'https://images.unsplash.com/photo-1551334787-21e6bd3ab135?w=640', // 当前显示图片的http链接
// urls: ['https://images.unsplash.com/photo-1551334787-21e6bd3ab135?w=640',
// 'https://images.unsplash.com/photo-1551214012-84f95e060dee?w=640',
// 'https://images.unsplash.com/photo-1551446591-142875a901a1?w=640'] // 需要预览的图片http链接列表
// })
// }
}
})
......@@ -5,9 +5,9 @@
interval="{{interval}}"
duration="{{duration}}"
>
<block wx:for="{{imgUrls}}" wx:key="{{item}}">
<block wx:for="{{imageData}}" wx:key="{{item}}">
<swiper-item>
<image src="{{item}}" bindtap='preview' class="slide-image" />
<image src="http://testimg3.bigaka.com{{item.imageUrl}}" bindtap='preview' class="slide-image" />
</swiper-item>
</block>
</swiper>
......@@ -7,6 +7,6 @@ swiper image{
border-radius:7rpx;
}
swiper-item{
border-radius: 7rpx;
border-radius: 10rpx;
height: 374rpx;
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment