index.min.js 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. let bannerSwiper = new Swiper(".banner-swiper", {
  2. direction: "horizontal",
  3. speed: 300,
  4. loop: !0,
  5. autoplay: {delay: 3e4},
  6. pagination: {el: ".banner-swiper .swiper-pagination", clickable: !0}
  7. }), caseSwiper = new Swiper(".case-swiper", {
  8. effect: "horizontal", loop: !1, on: {
  9. transitionEnd: function (a) {
  10. $(".product-tab .active").removeClass("active"), $("#product-tab-item" + a.activeIndex).addClass("active")
  11. }
  12. }
  13. });
  14. $(".product-tab-item").click(function () {
  15. caseSwiper.slideTo($(this).attr("name"))
  16. });
  17. let solutionIndex = 0, solutionSwiper = new Swiper(".solution-swiper", {
  18. effect: "horizontal", loop: !1, on: {
  19. transitionEnd: function (a) {
  20. solutionIndex = a.activeIndex, solutionItemActive(solutionIndex)
  21. }
  22. }
  23. });
  24. $(".solution-item").click(function () {
  25. solutionSwiper.slideTo($(this).attr("name"))
  26. });
  27. function solutionItemActive(a) {
  28. $(".solution-tab .active").removeClass("active"), $(".solution-item").eq(a).addClass("active"), $(".solution-item-bg").css({left: 162 * a + "px"})
  29. }
  30. $(".nav-link").click(function () {
  31. $(".nav-link-active").removeClass("nav-link-active"), $(this).addClass("nav-link-active");
  32. let a = $(this).attr("to") ? $($(this).attr("to")).offset().top : 0;
  33. return $("html, body").animate({scrollTop: a}, {duration: 500, easing: "swing"}), !1
  34. }), $(".login").click(function () {
  35. window.location.href = "https://www.workark.com/frontend/#/loginRegister/login"
  36. }), $(".register").click(function () {
  37. window.location.href = "https://www.workark.com/frontend/#/loginRegister/register"
  38. }), $(".jianzao").click(function () {
  39. window.location.href = "https://www.youjiyun.net/console/index.html"
  40. });