98 lines
2.2 KiB
JavaScript
98 lines
2.2 KiB
JavaScript
var vm = new Vue({
|
|
el: "#app",
|
|
data: {
|
|
tel: '',
|
|
i: 2,
|
|
activeIndex: 2,
|
|
solveSwiper: "",
|
|
teleManaI: 1,
|
|
teleMana2I: 1,
|
|
teleMana3I: 1
|
|
},
|
|
mounted() {
|
|
var _this = this;
|
|
var solveSwiper = new Swiper('.tele-swiper-container', {
|
|
// loop: true, // 循环模式选项
|
|
initialSlide: 1,
|
|
slidesPerView: 'auto',
|
|
centeredSlides: true,
|
|
observer: true,
|
|
// spaceBetween: -50,
|
|
// slidesOffsetBefore: -50,
|
|
observeParents: true,
|
|
slideToClickedSlide: true,
|
|
autoplay: {
|
|
delay: 5000
|
|
},
|
|
// pagination: {
|
|
// el: '.swiper-pagination',
|
|
// clickable: true,
|
|
// },
|
|
on: {
|
|
slideChangeTransitionStart() {
|
|
_this.i = this.activeIndex + 1;
|
|
},
|
|
},
|
|
});
|
|
this.solveSwiper = solveSwiper;
|
|
var customSwiper = new Swiper('.tele-custom-swiper-wrap', {
|
|
// loop: true, // 循环模式选项
|
|
initialSlide: 0,
|
|
slidesPerView: 3,
|
|
centeredSlides: true,
|
|
slidesPerView: 'auto',
|
|
observer: true,
|
|
observeParents: true,
|
|
autoplay: {
|
|
delay: 5000
|
|
},
|
|
navigation: {
|
|
nextEl: '.swiper-button-next',
|
|
prevEl: '.swiper-button-prev',
|
|
}
|
|
});
|
|
new Swiper('.webchat-phone-box', {
|
|
initialSlide: 1,//初始化时slide的索引
|
|
slidesPerView: 'auto',
|
|
slideToClickedSlide: true,
|
|
centeredSlides: true,
|
|
autoplay: {
|
|
delay: 3000,
|
|
disableOnInteraction: false
|
|
},
|
|
pagination: {
|
|
el: '.swiper-pagination',
|
|
clickable: true,
|
|
}
|
|
})
|
|
},
|
|
mixins: [mixins],
|
|
methods: {
|
|
solveTab(i) {
|
|
this.i = i;
|
|
var j = i - 1;
|
|
this.solveSwiper.slideTo(j, 1000, false);
|
|
},
|
|
teleMana(i) {
|
|
this.teleManaI = i;
|
|
},
|
|
teleMana2(i) {
|
|
this.teleMana2I = i;
|
|
},
|
|
teleMana3(i) {
|
|
this.teleMana3I = i;
|
|
},
|
|
toApply() {
|
|
var telReg = /^1[3-9][0-9]{9}$/;
|
|
if (telReg.test(this.tel)) {
|
|
location.href = "/apply/index.html?tel=" + this.tel;
|
|
} else[
|
|
alert("您输入的号码有误!")
|
|
]
|
|
}
|
|
}
|
|
});
|
|
if (screen.availWidth !== 1280 && window.devicePixelRatio !== 1.5) {
|
|
new WOW().init();
|
|
};
|