12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- //轮播图
- let bannerSwiper = new Swiper('.banner-swiper', {
- direction: 'horizontal',
- speed: 300,
- loop: true, // 循环模式选项
- autoplay: {
- delay: 30000, //5秒切换一次
- },
- pagination: {
- el: '.banner-swiper .swiper-pagination',
- clickable: true
- },
- })
- let caseSwiper = new Swiper(".case-swiper", {
- effect: "horizontal",
- loop: false,
- on: {
- transitionEnd: function(data) {
- $('.product-tab .active').removeClass('active');
- $('#product-tab-item' + data.activeIndex).addClass('active');
- }
- }
- });
- $('.product-tab-item').click(function() {
- caseSwiper.slideTo($(this).attr('name'))
- })
- let solutionIndex = 0;
- let solutionSwiper = new Swiper(".solution-swiper", {
- effect: "horizontal",
- loop: false,
- on: {
- transitionEnd: function(data) {
- solutionIndex = data.activeIndex;
- solutionItemActive(solutionIndex);
- }
- }
- });
- $('.solution-item').click(function() {
- solutionSwiper.slideTo($(this).attr('name'))
- })
- function solutionItemActive(index) {
- $('.solution-tab .active').removeClass('active');
- $('.solution-item').eq(index).addClass('active');
- $('.solution-item-bg').css({
- left: index * 162 + 'px'
- })
- }
- $('.nav-link').click(function() {
- $('.nav-link-active').removeClass('nav-link-active');
- $(this).addClass('nav-link-active');
- let top = !$(this).attr("to") ? 0 : $($(this).attr("to")).offset().top;
- $("html, body").animate({
- scrollTop: top
- }, {
- duration: 500,
- easing: "swing"
- });
- return false;
- })
- $('.register').click(function() {
- window.location.href = '/console/index.html'
- })
- $('.gonghai').click(function() {
- window.location.href = '/console/index.html/#/website/home'
- })
- $('.jianzao').click(function() {
- window.location.href = 'https://www.youjiyun.net/console/index.html'
- })
|