Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
7
7-Eleven
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
高淑倩
7-Eleven
Commits
ee284484
Commit
ee284484
authored
Jun 03, 2019
by
高淑倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify: 会员中心轮播图数据展示
parent
9ab0a80a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
17 deletions
+14
-17
imageSwiper.js
src/component/imageSwiper/imageSwiper.js
+10
-14
imageSwiper.wxml
src/component/imageSwiper/imageSwiper.wxml
+2
-2
imageSwiper.wxss
src/component/imageSwiper/imageSwiper.wxss
+2
-1
No files found.
src/component/imageSwiper/imageSwiper.js
View file @
ee284484
...
...
@@ -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链接列表
//
})
//
}
}
})
src/component/imageSwiper/imageSwiper.wxml
View file @
ee284484
...
...
@@ -5,9 +5,9 @@
interval="{{interval}}"
duration="{{duration}}"
>
<block wx:for="{{im
gUrls
}}" wx:key="{{item}}">
<block wx:for="{{im
ageData
}}" 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>
src/component/imageSwiper/imageSwiper.wxss
View file @
ee284484
...
...
@@ -7,6 +7,6 @@ swiper image{
border-radius:7rpx;
}
swiper-item{
border-radius:
7
rpx;
border-radius:
10
rpx;
height: 374rpx;
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment