You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
528 B
30 lines
528 B
2 years ago
|
Component({
|
||
|
data: {
|
||
|
currentIndex: 0
|
||
|
},
|
||
|
properties: {
|
||
|
bannerList: {
|
||
|
type: Array,
|
||
|
value: []
|
||
|
}
|
||
|
},
|
||
|
lifetimes: {
|
||
|
|
||
|
},
|
||
|
pageLifetimes: {
|
||
|
|
||
|
},
|
||
|
methods: {
|
||
|
swiperChange (e) {
|
||
|
if (e.detail.source === 'touch') {
|
||
|
this.setData({
|
||
|
currentIndex: e.detail.current
|
||
|
})
|
||
|
}
|
||
|
},
|
||
|
navigatetoBannerDetail (e) {
|
||
|
const { id, url, newsflag } = e.currentTarget.dataset
|
||
|
this.triggerEvent('navigatetoBannerDetail', {id, url, newsFlag: newsflag} )
|
||
|
}
|
||
|
}
|
||
|
})
|