|
@@ -32,8 +32,12 @@ |
|
@@ -32,8 +32,12 @@ |
32
|
autoplay: true,
|
32
|
autoplay: true,
|
33
|
pagination: {
|
33
|
pagination: {
|
34
|
el: '.swiper-pagination'
|
34
|
el: '.swiper-pagination'
|
|
|
35
|
+ },
|
|
|
36
|
+ on:{
|
|
|
37
|
+ slideChange: this._slideChange,
|
35
|
}
|
38
|
}
|
36
|
- }
|
39
|
+ },
|
|
|
40
|
+ itemVisibleStatus: {}
|
37
|
};
|
41
|
};
|
38
|
},
|
42
|
},
|
39
|
computed: {
|
43
|
computed: {
|
|
@@ -44,6 +48,17 @@ |
|
@@ -44,6 +48,17 @@ |
44
|
methods: {
|
48
|
methods: {
|
45
|
swiperSuccess(swiper) {
|
49
|
swiperSuccess(swiper) {
|
46
|
this.mySwiper = swiper;
|
50
|
this.mySwiper = swiper;
|
|
|
51
|
+
|
|
|
52
|
+ // 注册成功后上报首个slide
|
|
|
53
|
+ let param = {
|
|
|
54
|
+ I_INDEX: this.mySwiper.realIndex + 1,
|
|
|
55
|
+ P_NAME: this.$route.name,
|
|
|
56
|
+ F_NAME: this.value.template_name,
|
|
|
57
|
+ F_ID: this.value.template_id,
|
|
|
58
|
+ F_INDEX: this.index + 1,
|
|
|
59
|
+ ACTION_URL: this.value.data[this.mySwiper.realIndex].url
|
|
|
60
|
+ };
|
|
|
61
|
+ this.dataRecord(param);
|
47
|
},
|
62
|
},
|
48
|
activeLink() {
|
63
|
activeLink() {
|
49
|
const img = this.value.data[this.mySwiper.realIndex];
|
64
|
const img = this.value.data[this.mySwiper.realIndex];
|
|
@@ -54,6 +69,30 @@ |
|
@@ -54,6 +69,30 @@ |
54
|
this.$refs.linkA.click();
|
69
|
this.$refs.linkA.click();
|
55
|
});
|
70
|
});
|
56
|
}
|
71
|
}
|
|
|
72
|
+ },
|
|
|
73
|
+ _slideChange() {
|
|
|
74
|
+ if (this.mySwiper) {
|
|
|
75
|
+
|
|
|
76
|
+ // fixed: slideChange回调执行时,realIndex为0会前后触发两次
|
|
|
77
|
+ if (this.mySwiper.previousIndex === this.value.data.length + 1) {
|
|
|
78
|
+ return;
|
|
|
79
|
+ }
|
|
|
80
|
+
|
|
|
81
|
+ let param = {
|
|
|
82
|
+ I_INDEX: this.mySwiper.realIndex + 1,
|
|
|
83
|
+ P_NAME: this.$route.name,
|
|
|
84
|
+ F_NAME: this.value.template_name,
|
|
|
85
|
+ F_ID: this.value.template_id,
|
|
|
86
|
+ F_INDEX: this.index + 1,
|
|
|
87
|
+ ACTION_URL: this.value.data[this.mySwiper.realIndex].url
|
|
|
88
|
+ };
|
|
|
89
|
+
|
|
|
90
|
+ this.dataRecord(param);
|
|
|
91
|
+ }
|
|
|
92
|
+ },
|
|
|
93
|
+ dataRecord(param) {
|
|
|
94
|
+ // index 用户父组件判断当前组件是否可见
|
|
|
95
|
+ this.$parent.focusComponentDataRecord(this.index, param)
|
57
|
}
|
96
|
}
|
58
|
},
|
97
|
},
|
59
|
components: {Resource}
|
98
|
components: {Resource}
|