index.js 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218
  1. // 产品鼠标移入移出
  2. let fls = true
  3. $('#productHov').hover(function () {$("#product").show()},function () {
  4. setTimeout(function() {
  5. if(fls) {
  6. $("#product").hide()
  7. }
  8. }, 200)
  9. })
  10. $('#product').hover(function () {
  11. fls = false
  12. $("#product").show()
  13. },function () {
  14. fls = true
  15. $("#product").hide()
  16. })
  17. // 导航下划线
  18. $('.aus li').hover(function () {
  19. let i = $(this).index()
  20. $(".aus li").eq(i).addClass('tils')
  21. },function () {
  22. let i = $(this).index()
  23. $(".aus li").eq(i).removeClass('tils')
  24. })
  25. $('.auss li').hover(function () {
  26. let i = $(this).index()
  27. $(".auss li").eq(i).addClass('tils')
  28. },function () {
  29. let i = $(this).index()
  30. $(".auss li").eq(i).removeClass('tils')
  31. })
  32. // 智能系统管家模块的js效果
  33. let screenHeight = $(window).height()
  34. // 系统智能的高度
  35. let jiesaoTop = $('.jiesao').offset().top
  36. // 智能引擎的高度
  37. let znyqTop = $('.znyq').offset().top
  38. let fill = $('.fill').offset().top
  39. let tooltipsOffTop = $('#pricing').offset().top
  40. let filss = ''
  41. let tooltips = ''
  42. var devicewidth = document.documentElement.clientWidth
  43. if(document.documentElement.clientWidth < 1900) {
  44. var scale = devicewidth / 1920
  45. filss = fill * scale
  46. tooltips = tooltipsOffTop * scale
  47. } else {
  48. filss = fill
  49. tooltips = tooltipsOffTop
  50. }
  51. $(window).scroll(function () {
  52. // 当前滚动的高度
  53. let currentTop = $(window).scrollTop()
  54. if(currentTop < 2) {
  55. $('#all').removeClass('hanAll')
  56. $('#abc').addClass('abc')
  57. $("#loGo").attr("src", './image/logo.png')
  58. } else {
  59. $("#all").addClass("hanAll");
  60. $("#abc").removeClass("abc");
  61. $("#loGo").attr("src", './image/logo.jpg')
  62. }
  63. // 系统管理滚动计算
  64. if (currentTop > jiesaoTop && currentTop < (jiesaoTop + screenHeight)) {
  65. let jiesaoopacity = (currentTop - jiesaoTop) / screenHeight
  66. // let jiesaopadding = (1 - jiesaoopacity) * 300 + 'px'
  67. let jieMIngcs = jiesaoopacity > 0.8 ? jiesaoopacity : '0'
  68. // 文字加透明
  69. $('#manConDDp1').css({'opacity': jieMIngcs})
  70. $('#manConDDp2').css({'opacity': jieMIngcs})
  71. $('#manConDDp3').css({'opacity': jieMIngcs})
  72. $('#manConDDp4').css({'opacity': jieMIngcs})
  73. $('#manConDDp5').css({'opacity': jieMIngcs})
  74. $('#manConDDp6').css({'opacity': jieMIngcs})
  75. $('#manConDDp7').css({'opacity': jieMIngcs})
  76. // 偏移
  77. $('#manConDD1').css({'transform': `translate(0, ${(1 - jiesaoopacity) * 293}px)`})
  78. $('#manConDD2').css({'transform': `translate(-${(1 - jiesaoopacity) * 362}px, ${(1 - jiesaoopacity) * 123}px)`})
  79. $('#manConDD3').css({'transform': `translate(-${(1 - jiesaoopacity) * 362}px, -${(1 - jiesaoopacity) * 141}px)`})
  80. $('#manConDD4').css({'transform': `translate(-${(1 - jiesaoopacity) * 162}px, -${(1 - jiesaoopacity) * 339}px)`})
  81. $('#manConDD5').css({'transform': `translate(${(1 - jiesaoopacity) * 162}px, -${(1 - jiesaoopacity) * 339}px)`})
  82. $('#manConDD6').css({'transform': `translate(${(1 - jiesaoopacity) * 362}px, -${(1 - jiesaoopacity) * 141}px)`})
  83. $('#manConDD7').css({'transform': `translate(${(1 - jiesaoopacity) * 362}px, ${(1 - jiesaoopacity) * 123}px)`})
  84. }
  85. // 智能引擎滚动计算
  86. // if(currentTop > znyqTop && currentTop < (znyqTop + screenHeight) && currentTop < 3000) {
  87. // let znyqTopopacity = (2900 - currentTop)
  88. // let znyqToppadding = (znyqTopopacity - 1) * 1.15 + 'px'
  89. // $('#znyqH').css({'transform':'translate(0,'+znyqToppadding+')'})
  90. // }
  91. if(currentTop > znyqTop && currentTop < (znyqTop + screenHeight)) {
  92. let teamOffset = (currentTop - znyqTop) / screenHeight
  93. $('#znyqH').css({'transform':`translate(0, ${(1 - teamOffset) * 260}px)`})
  94. }
  95. if(currentTop > znyqTop && currentTop < (znyqTop + screenHeight + 800) && currentTop > 2900) {
  96. let znyqTopopacityVal = (currentTop - znyqTop) / (screenHeight + 800)
  97. // 550的
  98. let znyqToppaddingfives = (1 - znyqTopopacityVal) * 550 + 'px'
  99. // 500的
  100. let znyqToppaddingfive = (1 - znyqTopopacityVal) * 500 + 'px'
  101. // 400的
  102. let znyqToppaddingfour = (1 - znyqTopopacityVal) * 400 + 'px'
  103. // 300的
  104. let znyqToppaddingthree = (1 - znyqTopopacityVal) * 300 + 'px'
  105. if(znyqTopopacityVal < 0.2) znyqTopopacityVal = 0
  106. $('#selMou1').css({'opacity': znyqTopopacityVal, 'transform':'translate(-'+znyqToppaddingfive+',-'+ znyqToppaddingfive +')'})
  107. $('#selMou2').css({'opacity': znyqTopopacityVal, 'transform':'translate(-'+znyqToppaddingfour+',-'+ znyqToppaddingfour +')'})
  108. $('#selMou3').css({'opacity': znyqTopopacityVal, 'transform':'translate(-'+znyqToppaddingfive+','+ znyqToppaddingfive +')'})
  109. $('#selMou4').css({'opacity': znyqTopopacityVal, 'transform':'translate(-'+znyqToppaddingfour+','+ znyqToppaddingfour +')'})
  110. $('#selMour1').css({'opacity': znyqTopopacityVal, 'transform':'translate('+znyqToppaddingthree+',-'+ znyqToppaddingthree +')'})
  111. $('#selMour2').css({'opacity': znyqTopopacityVal, 'transform':'translate('+znyqToppaddingfour+',-'+ znyqToppaddingfour +')'})
  112. $('#selMour3').css({'opacity': znyqTopopacityVal, 'transform':'translate('+znyqToppaddingfive+',-'+ znyqToppaddingfive +')'})
  113. $('#selMour4').css({'opacity': znyqTopopacityVal, 'transform':'translate('+znyqToppaddingfives+',-'+ znyqToppaddingfives +')'})
  114. $('#selMour5').css({'opacity': znyqTopopacityVal, 'transform':'translate('+znyqToppaddingthree+','+ znyqToppaddingthree +')'})
  115. $('#selMour6').css({'opacity': znyqTopopacityVal, 'transform':'translate('+znyqToppaddingfour+','+ znyqToppaddingfour +')'})
  116. $('#selMour7').css({'opacity': znyqTopopacityVal, 'transform':'translate('+znyqToppaddingfive+','+ znyqToppaddingfive +')'})
  117. $('#selMour8').css({'opacity': znyqTopopacityVal, 'transform':'translate('+znyqToppaddingfives+','+ znyqToppaddingfives +')'})
  118. }
  119. // 加样式 (填报、审批、统计分分钟搞定)
  120. if(currentTop > filss - 300) {
  121. $('#fillCon').addClass('fillCons')
  122. }
  123. if(currentTop < filss - 400){
  124. $("#fillCon").removeClass("fillCons");
  125. }
  126. // 加样式 (产品定价)
  127. if(currentTop > tooltips - 500) {
  128. $('#tooltipTis').addClass('tooltipTisFillCons')
  129. }
  130. if(currentTop < tooltips - 800){
  131. $("#tooltipTis").removeClass("tooltipTisFillCons");
  132. }
  133. })
  134. // tab点击
  135. $(function() {
  136. $('#tablTabUl li').click(function() {
  137. let index = $(this).index()
  138. var arr = $('#tablTabUl li')
  139. for(var i in arr) {
  140. $('#tablTabUl li').eq(i).find('img').attr("src", './image/ions/'+ (+i + 1)+'.1.png')
  141. $('#tablTabUl li').removeClass('tabOn')
  142. }
  143. $(this).addClass("tabOn")
  144. $(this).find('img').attr("src", './image/ions/'+(+index + 1)+'.png')
  145. $('#finImg').attr("src", './image/gs'+(+index + 1)+'.jpg')
  146. })
  147. })
  148. // 客服hover
  149. $('#zhixun').hover(function () {
  150. $("#zhixun").show()
  151. $("#consultigImg").attr("src", './image/ions/kefu1.png')
  152. },function () {
  153. $("#zhixun").hide()
  154. $("#consultigImg").attr("src", './image/ions/kefu2.png')
  155. })
  156. $('#consulting').hover(function () {
  157. $("#zhixun").show()
  158. $("#consultigImg").attr("src", './image/ions/kefu1.png')
  159. },function () {
  160. $("#zhixun").hide()
  161. $("#consultigImg").attr("src", './image/ions/kefu2.png')
  162. })
  163. let nums = 0
  164. let mobiledistance = 0
  165. // 客户点击
  166. $(function() {
  167. kehuFlg()
  168. $('#kehuLeft').click(function() {
  169. if(nums > 0 && nums <= 5) {
  170. nums--
  171. zuoyouClick()
  172. }
  173. })
  174. $('#kehuRight').click(function() {
  175. if(nums < 5) {
  176. nums++
  177. zuoyouClick()
  178. }
  179. })
  180. })
  181. function zuoyouClick() {
  182. mobiledistance = '-' + (nums * 510) + 'px'
  183. $('.conImg').stop(true,false).animate({
  184. 'left': mobiledistance
  185. }, 400)
  186. kehuFlg()
  187. }
  188. function kehuFlg() {
  189. if(nums == 0) {
  190. $('#kehuLeft').find('img').attr("src", './image/ions/zuos.png')
  191. $('#kehuLeft').addClass("zhis")
  192. } else {
  193. $('#kehuLeft').find('img').attr("src", './image/ions/zuo.png')
  194. $('#kehuLeft').removeClass("zhis")
  195. }
  196. if(nums >= 5) {
  197. $('#kehuRight').find('img').attr("src", './image/ions/yous.png')
  198. $('#kehuRight').addClass("zhis")
  199. } else {
  200. $('#kehuRight').find('img').attr("src", './image/ions/you.png')
  201. $('#kehuRight').removeClass("zhis")
  202. }
  203. }