Commit ee284484 by 高淑倩

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

parent 9ab0a80a
...@@ -15,17 +15,13 @@ Component({ ...@@ -15,17 +15,13 @@ Component({
}, },
}, },
attached () { attached () {
// console.log('this.data', this.data) console.log('this.data', this.data)
}, },
/** /**
* 组件的初始数据 * 组件的初始数据
*/ */
data: { data: {
imgUrls: [ 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'
],
indicatorDots: true, indicatorDots: true,
autoplay: true, autoplay: true,
interval: 5000, interval: 5000,
...@@ -35,13 +31,13 @@ Component({ ...@@ -35,13 +31,13 @@ Component({
* 组件的方法列表 * 组件的方法列表
*/ */
methods: { methods: {
preview() { // preview() {
wx.previewImage({ // wx.previewImage({
current: 'https://images.unsplash.com/photo-1551334787-21e6bd3ab135?w=640', // 当前显示图片的http链接 // current: 'https://images.unsplash.com/photo-1551334787-21e6bd3ab135?w=640', // 当前显示图片的http链接
urls: ['https://images.unsplash.com/photo-1551334787-21e6bd3ab135?w=640', // urls: ['https://images.unsplash.com/photo-1551334787-21e6bd3ab135?w=640',
'https://images.unsplash.com/photo-1551214012-84f95e060dee?w=640', // 'https://images.unsplash.com/photo-1551214012-84f95e060dee?w=640',
'https://images.unsplash.com/photo-1551446591-142875a901a1?w=640'] // 需要预览的图片http链接列表 // 'https://images.unsplash.com/photo-1551446591-142875a901a1?w=640'] // 需要预览的图片http链接列表
}) // })
} // }
} }
}) })
...@@ -5,9 +5,9 @@ ...@@ -5,9 +5,9 @@
interval="{{interval}}" interval="{{interval}}"
duration="{{duration}}" duration="{{duration}}"
> >
<block wx:for="{{imgUrls}}" wx:key="{{item}}"> <block wx:for="{{imageData}}" wx:key="{{item}}">
<swiper-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> </swiper-item>
</block> </block>
</swiper> </swiper>
...@@ -7,6 +7,6 @@ swiper image{ ...@@ -7,6 +7,6 @@ swiper image{
border-radius:7rpx; border-radius:7rpx;
} }
swiper-item{ swiper-item{
border-radius: 7rpx; border-radius: 10rpx;
height: 374rpx; 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