1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
| <template>
| <view class="coreshop-bg-white">
| <u-swiper :list="swiperItems" :height="swiperHeight" :interval="swiperDuration" keyName="image" @click="onClicked" indicator indicatorMode="line" circular radius="0"></u-swiper>
| </view>
| </template>
|
| <script>
| export default {
| name: "coreshopImgSlide",
| props: {
| coreshopData: {
| type: Object,
| required: true,
| }
| },
| data() {
| return {
| swiperItems: [],
| swiperHeight: 150,
| swiperDuration: 2500,
| };
| },
| computed: {
| count() {
| return (this.coreshopData.list.length > 0)
| }
| },
| created() {
| var data = this.coreshopData.list;
| for (var i = 0; i < data.length; i++) {
| let moder = {
| image: data[i].image,
| opentype: 'click',
| url: '',
| title: data[i].linkType,
| linkType: data[i].linkType,
| linkValue: data[i].linkValue,
| }
| this.swiperItems.push(moder);
| }
| this.swiperHeight = this.coreshopData.height;
| this.swiperDuration = this.coreshopData.duration;
| },
| methods: {
| onClicked: function (e) {
| this.showSliderInfo(this.swiperItems[e].linkType, this.swiperItems[e].linkValue);
| },
| }
| }
| </script>
|
|