main.js 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. $(function(){
  2. var swiper = new Swiper('.in_banner-swiper', {
  3. pagination: '.in_banner-pagination',
  4. autoplay: 3000,
  5. autoplayDisableOnInteraction: false,
  6. loop: true
  7. });
  8. $("#menu").on("click",function(){
  9. $("#menu_input").toggleClass("on");
  10. $("body").toggleClass("isMask");
  11. $("html").toggleClass("isMask");
  12. $("#mask").toggleClass("on");
  13. $('html,body').scrollTop(0);
  14. })
  15. $("#mask").on("click",function(){
  16. $("#mask").toggleClass("on");
  17. $("#menu_input").toggleClass("on");
  18. $("body").toggleClass("isMask");
  19. $("html").toggleClass("isMask");
  20. })
  21. $(window).scroll(function(){
  22. var scrollTop=0;
  23. scrollTop = $(document).scrollTop();
  24. var a = scrollTop/500;
  25. if(a<=0.9){
  26. $("header").css({"background":"rgba(0,0,0,"+a+")"});
  27. }if(a>0.9){
  28. $("header").css({"background":"rgba(0,0,0,0.9)"});
  29. }
  30. });
  31. var in_case_swiper = new Swiper('.in_case-swiper', {
  32. pagination: '.in_case-pagination',
  33. autoplayDisableOnInteraction: false
  34. });
  35. var angle = 0;
  36. setInterval(function() {
  37. angle += 10;
  38. $("#bj-loding .ball div").rotate(angle);
  39. }, 50);
  40. var web_flow_swiper = new Swiper ('.web_flow-swiper', {
  41. slidesPerView: 2,
  42. paginationClickable: true,
  43. spaceBetween: 10,
  44. pagination: '.web_flow-pagination',
  45. loop:true
  46. })
  47. var web_flow_swiper = new Swiper ('.wechat_function-swiper', {
  48. slidesPerView: 2,
  49. paginationClickable: true,
  50. spaceBetween: 20,
  51. pagination: '.wechat_function-pagination',
  52. loop:true
  53. })
  54. var web_flow_swiper = new Swiper ('.miniApps_advantage-swiper', {
  55. slidesPerView: 2,
  56. paginationClickable: true,
  57. spaceBetween: 10,
  58. pagination: '.miniApps_advantage-pagination',
  59. loop:true
  60. })
  61. var web_flow_swiper = new Swiper ('.app_advantage-swiper', {
  62. paginationClickable: true,
  63. pagination: '.app_advantage-pagination',
  64. loop:true
  65. })
  66. var miniAppsList_swiper = new Swiper ('.miniAppsList-swiper', {
  67. slidesPerView: 2,
  68. paginationClickable: true,
  69. pagination: '.miniAppsList-pagination',
  70. loop:true
  71. })
  72. })