$(function(){ $(".qiye_mMenu").hide(); $(".qiye_mIcon").click(function() { if ($(this).hasClass("qiye_mIconActive")) { $(this).removeClass("qiye_mIconActive").addClass("qiye_mIconClose"); $(".qiye_mMenu").show().slideUp(); } else { $(this).removeClass("qiye_mIconClose").addClass("qiye_mIconActive"); $(".qiye_mMenu").hide().slideDown(); } }); $(".qiye_htop").click(function() { $('body,html').animate({ scrollTop: 0 }, 600); }) $(".qiye_f_x").click(function() { $(".qiye_f_nav").hide() }) var pimg = $(".qiye_editor p").width(); $(".qiye_editor p img").css({ "height": pimg * 0.65 + 'px' }) $('.company-profilep').css({ "min-height": "225px" }) if ($(".qiye_acenter .qiye_aimg:has(img)").length) { var Bheight = $(".qiye_acenter .qiye_aimg").width(); $(".qiye_acenter .qiye_aimg").css({ "height": Bheight * 1.15 + 'px', "background": "#f5f5f5" }) $(".qiye_acenter .qiye_aimg img").css({ "height": Bheight * 1.15 + 'px', "width": "100%", "display": "block" }) } else { $('.qiye_acenter .qiye_atxt').css({ "width": "100%" }) $('.company-profilea').css({ "margin-top": "45px", "position": "inherit" }) } $('body').append("

"); var mySwiper = new Swiper('.swiper-container', { autoplay: 3000, loop: true, pagination: '.pagination', paginationClickable: true, autoplayDisableOnInteraction: false, mousewheelControl: false, calculateHeight: true, }); $('.arrow-left').on('click', function(e) { e.preventDefault(); mySwiper.swipePrev() }); $('.arrow-right').on('click', function(e) { e.preventDefault(); mySwiper.swipeNext() }); $(document).bind("contextmenu",function(){return false;}); $('.qiye_tab-title .qiye_title-item').click(function() { var $this = $(this); $(this).addClass('active').siblings('.qiye_tab-title .qiye_title-item').removeClass('active'); $('.friendship-links').eq($this.index()).addClass('active').siblings('.friendship-links').removeClass('active'); }); var imgheight = $(".qiye_product_wson li").width() $(".qiye_product_wson li img").css("height", imgheight * 0.8 + "px"); $(".qiye_product_none").css("height", imgheight * 0.8 + "px"); var imgheight2 = $(".product-list li").width() $(".product-list li img").css("height", imgheight2 * 0.8 + "px"); var Name = $(".qiye_logo span").html(); if (Name.length >= 6) { $(".qiye_logo span").css({ "font-size": "36px" }) } if (Name.length >= 8) { $(".qiye_logo span").css({ "font-size": "34px" }) } if (Name.length >= 10) { $(".qiye_logo span").css({ "font-size": "30px" }) } if (Name.length >= 12) { $(".qiye_logo span").css({ "font-size": "24px" }) } if (Name.length >= 14) { $(".qiye_logo span").css({ "font-size": "22px" }) } if (Name.length >= 15) { $(".qiye_logo span").css({ "font-size": "18px" }) } $('.qiye_mbutton').click(function(){ if ($(this).hasClass("menu-open")) { $('.mainNav').slideUp(); $(this).removeClass('menu-open') } else{ $('.mainNav').slideDown(); $(this).addClass('menu-open') } }) var aboutimg = $("#qiye_boximg li").width(); $("#qiye_boximg li img").css("height",aboutimg * 0.8 + "px"); if ($("#qiye_copy").length>0) { var speeda = 30; var directiona = "top"; var taba = document.getElementById("qiye_scrollbox"); var tab1a = document.getElementById("qiye_boximg"); var tab2a = document.getElementById("qiye_copy"); var leftDira = document.getElementById("leftDir"); var rightDira = document.getElementById("rightDir"); tab2a.innerHTML = tab1a.innerHTML; function marquee() { switch (directiona) { case "top": if (tab2a.offsetHeight - taba.scrollTop <= 0) { taba.scrollTop -= tab1a.offsetHeight; } else { taba.scrollTop++; } break; case "bottom": if (taba.scrollTop <= 0) { taba.scrollTop += tab2a.offsetHeight; } else { taba.scrollTop--; } break; } } function changeDirection(dir) { directiona = dir; } var timera = setInterval(marquee, speeda); taba.onmouseover = function() { clearInterval(timera); }; taba.onmouseout = function() { timera = setInterval(marquee, speeda); }; }; }); $(function(){ var windowWidth = $(window).width(); let productLeftWidth = $('.qiye_dt_left').innerWidth(); let productLeftHeight = $('.qiye_dt_left').innerHeight(); $('.viewBigPic img').css({'display':'block'}); if (windowWidth > 768) { $('.qiye_det_top').css({'position':'relative'}); $('.viewBigPic').css({'position':'absolute','left':productLeftWidth+10+'px','top':'0','width':productLeftWidth+'px','height':productLeftHeight+'px','overflow':'hidden','background':'#fff','z-index':'9'}).hide(); $('.viewBigPic img').css({'display':'block','position':'absolute'}); $('.qiye_dt_left').css({'position':'relative'}); $('.viewBigSolid').css({'position':'absolute','width':'70px','background':'rgba(255,255,255,.4)','height':'70px','z-index':'9','border':'1px solid rgba(255,255,255,1)'}).hide(); window.addEventListener('load', function () { var boxWrap = $('.qiye_det_top'); var box = document.querySelector('.qiye_dt_left'); var yy = document.querySelector('.viewBigSolid'); var big = document.querySelector('.viewBigPic'); box.addEventListener('mouseover', function () { yy.style.display = 'block'; big.style.display = 'block'; let activeViewPic = $('.qiye_dt_left img').attr('src'); $('.viewBigPic img').attr('src',activeViewPic); }); box.addEventListener('mouseout', function () { yy.style.display = 'none'; big.style.display = 'none'; }); box.addEventListener('mousemove', function (e) { var x = e.pageX - boxWrap.offset().left; var y = e.pageY - boxWrap.offset().top; var width = x - yy.offsetWidth / 2; var height = y - yy.offsetHeight / 2; if (width <= 0) { width = 0; } else if (width >= box.offsetWidth - yy.offsetWidth) { width = box.offsetWidth - yy.offsetWidth; } if (height <= 0) { height = 0; } else if (height >= box.offsetHeight - yy.offsetHeight) { height = box.offsetHeight - yy.offsetHeight; } yy.style.left = width + 'px'; yy.style.top = height + 'px'; var bigimg = document.querySelector('.viewBigPic>img'); var bigx = width * (bigimg.offsetWidth - big.offsetWidth) / (box.offsetWidth - yy.offsetWidth); var bigy = height * (bigimg.offsetHeight - big.offsetHeight) / (box.offsetHeight - yy.offsetHeight); bigimg.style.left = -bigx + 'px'; bigimg.style.top = -bigy + 'px'; }); }); }; })