123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139 |
- // 屏幕试图的高度
- let screenHeight = $(window).height()
- // 客户管家
- let collaborationTeamHight = $('#collaborationTeam').offset().top
- $(window).scroll(function () {
- // 当前滚动的高度
- let currentTop = $(window).scrollTop()
- if(currentTop < 2) {
- $('#all').removeClass('hanAll')
- $('#abc').addClass('abc')
- $('#navigationBar').removeClass('white')
- $("#loGo").attr("src", './image/logo.png')
- } else {
- $("#all").addClass("hanAll");
- $("#abc").removeClass("abc");
- $("#navigationBar").addClass("white");
- $("#loGo").attr("src", './image/logo.jpg')
- }
- // 客户管家滚动计算
- if(currentTop > collaborationTeamHight && currentTop < (collaborationTeamHight + screenHeight)) {
- let teamOffset = (currentTop - collaborationTeamHight) / screenHeight
- console.log(teamOffset, '透明度')
- $('#collCentImg').css({'transform': `translate(0, ${(1 - teamOffset) * 250}px)`})
- $('#collCentFonts').css({'opacity': teamOffset})
- }
- })
- // 导航下划线
- $('.aus li').hover(function () {
- let i = $(this).index()
- $(".aus li").eq(i).addClass('tils')
- },function () {
- let i = $(this).index()
- $(".aus li").eq(i).removeClass('tils')
- })
- $('.auss li').hover(function () {
- let i = $(this).index()
- $(".auss li").eq(i).addClass('tils')
- },function () {
- let i = $(this).index()
- $(".auss li").eq(i).removeClass('tils')
- })
- // 客服hover
- $('#zhixun').hover(function () {
- $("#zhixun").show()
- $("#consultigImg").attr("src", './image/ions/kefu1.png')
- },function () {
- $("#zhixun").hide()
- $("#consultigImg").attr("src", './image/ions/kefu2.png')
- })
- $('#consulting').hover(function () {
- $("#zhixun").show()
- $("#consultigImg").attr("src", './image/ions/kefu1.png')
- },function () {
- $("#zhixun").hide()
- $("#consultigImg").attr("src", './image/ions/kefu2.png')
- })
- // 产品鼠标移入移出
- let fls = true
- $('#productHov').hover(function () {$("#product").show()},function () {
- setTimeout(function() {
- if(fls) {
- $("#product").hide()
- }
- }, 200)
- })
- $('#product').hover(function () {
- fls = false
- $("#product").show()
- },function () {
- fls = true
- $("#product").hide()
- })
- // 特色展示
- $('#specialShowConLeftUL li').click(function () {
- let index = $(this).index()
- // console.log(index, '索引')
- $('#tesTex').html(+index + 1 + '/11')
- $('#tesSpan').css('width', (+index + 1) * 9.09 + '%')
- let arr = $('#specialShowConLeftUL li')
- // if(index != '1' && index != '7') {
- for(let i in arr) {
- $('#specialShowConLeftUL li').removeClass('on')
- }
- $(this).addClass("on")
- $('#easyManBoxConImg').attr("src", './image/customer/li'+(+index + 1)+'.png')
- // }
- })
- // 用户评价点击事件
- let numberClick = 0
- // 移动的距离
- let mobiledistance = 0
- $(function() {
- kehuFlg()
- $('#kehuRight').click(function() {
- if(numberClick < 3) {
- numberClick++
- zuoyouClick()
- }
- })
- $('#kehuLeft').click(function() {
- if(numberClick > 0 && numberClick <= 3) {
- numberClick--
- zuoyouClick()
- }
- })
- })
- function zuoyouClick() {
- console.log(numberClick)
- mobiledistance = '-' + (numberClick * 68.75) + 'rem'
- $('.evaluationConIkun').stop(true,false).animate({
- 'left': mobiledistance
- }, 400)
- kehuFlg()
- }
- function kehuFlg() {
- if(numberClick == 0) {
- $('#kehuLeft').addClass("zhis")
- } else {
- $('#kehuLeft').removeClass("zhis")
- }
- if(numberClick >= 3) {
- $('#kehuRight').addClass("zhis")
- } else {
- $('#kehuRight').removeClass("zhis")
- }
- }
|