...
|
...
|
@@ -32,8 +32,12 @@ |
|
|
autoplay: true,
|
|
|
pagination: {
|
|
|
el: '.swiper-pagination'
|
|
|
},
|
|
|
on:{
|
|
|
slideChange: this._slideChange,
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
itemVisibleStatus: {}
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
...
|
...
|
@@ -44,6 +48,17 @@ |
|
|
methods: {
|
|
|
swiperSuccess(swiper) {
|
|
|
this.mySwiper = swiper;
|
|
|
|
|
|
// 注册成功后上报首个slide
|
|
|
let param = {
|
|
|
I_INDEX: this.mySwiper.realIndex + 1,
|
|
|
P_NAME: this.$route.name,
|
|
|
F_NAME: this.value.template_name,
|
|
|
F_ID: this.value.template_id,
|
|
|
F_INDEX: this.index + 1,
|
|
|
ACTION_URL: this.value.data[this.mySwiper.realIndex].url
|
|
|
};
|
|
|
this.dataRecord(param);
|
|
|
},
|
|
|
activeLink() {
|
|
|
const img = this.value.data[this.mySwiper.realIndex];
|
...
|
...
|
@@ -54,6 +69,30 @@ |
|
|
this.$refs.linkA.click();
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
_slideChange() {
|
|
|
if (this.mySwiper) {
|
|
|
|
|
|
// fixed: slideChange回调执行时,realIndex为0会前后触发两次
|
|
|
if (this.mySwiper.previousIndex === this.value.data.length + 1) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
let param = {
|
|
|
I_INDEX: this.mySwiper.realIndex + 1,
|
|
|
P_NAME: this.$route.name,
|
|
|
F_NAME: this.value.template_name,
|
|
|
F_ID: this.value.template_id,
|
|
|
F_INDEX: this.index + 1,
|
|
|
ACTION_URL: this.value.data[this.mySwiper.realIndex].url
|
|
|
};
|
|
|
|
|
|
this.dataRecord(param);
|
|
|
}
|
|
|
},
|
|
|
dataRecord(param) {
|
|
|
// index 用户父组件判断当前组件是否可见
|
|
|
this.$parent.focusComponentDataRecord(this.index, param)
|
|
|
}
|
|
|
},
|
|
|
components: {Resource}
|
...
|
...
|
|