$(document).ready(function () { var u = navigator.userAgent; var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //android缁堢 var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios缁堢 if (isiOS) { $('html').css('cursor', 'pointer') } // 鏄惁鏄井淇℃祻瑙堝櫒 var isWx = u.toLowerCase().match(/MicroMessenger/i) == 'micromessenger' // 鏄惁鏄胺姝屾祻瑙堝櫒 var isChrome = u.indexOf('Chrome') > 1 // 鏄惁鏄痠E娴忚鍣 var isIE = u.indexOf('Trident') > 1 if (isChrome) { if (u.toLowerCase().match(/wow64/) == null && !u.indexOf('Mac')) { // 涓嶆槸360娴忚鍣 && 涓嶆槸鑻规灉 $(".consulting_p1").css({ '-webkit-text-fill-color': 'transparent' }) } } if (isIE) { $(".trend_page").remove() } $('.pub_nav_b li').mousemove(function () { $(this).find('.pub_nav_hover').stop(true, false).slideDown() }).mouseleave(function () { $(this).find('.pub_nav_hover').stop(true, false).slideUp() }) $('.pub_nav_d1').mousemove(function () { if ($(this).find('.pub_p8').length > 0) { $(this).find('div').slideDown() } }).mouseleave(function () { if ($(this).find('.pub_p8').length > 0) { $(this).find('div').slideUp() } }) // wap $(".pub_menu").click(function () { $(this).toggleClass('on'); $(".pub_header").toggleClass('on'); $('.pub_menu_ff').fadeToggle() $('.pub_menu_ff ul').slideToggle() $('.pub_menu_ft').css('right', '-100%') $('.pub_menu_ft').css('background', 'rgba(35, 41, 55, 1)') $('.pub_menu_ft').css('width', $('.pub_menu_ul').outerWidth() + 'px') $('video').fadeToggle() }); $('.pub_menu_ul').scroll(function () { $('.pub_menu_ft').css('top', $('.pub_menu_ul').scrollTop() + 'px') }) // $('.pub_menu_ff_li').click(function () { // $(this).find('.pub_menu_ft').css('right', '0') // $('.pub_menu_ul').css('overflow-y', 'hidden') // }) $('.pub_menu_ff_li .nav_show').click(function () { $(this).parents('.pub_menu_ff_li').find('.pub_menu_ft').css('right', '0') $('.pub_menu_ul').css('overflow-y', 'hidden') }) $('.pub_menu_back').click(function () { event.stopPropagation(); $('.pub_menu_ul').css('overflow-y', 'scroll') $(this).parents('.pub_menu_ft').css('right', '-100%') }) $(window).scroll(function () { if ($(window).scrollTop() > 200) { // $(".reTop").css('display', 'flex') // $(".reGo").css('display', 'flex') } else { $(".reTop").hide() $(".reGo").hide() } }) $(document).on('click', '.head_d2', function () { let url = $(this).attr('data-src') let html = '
' $('.pub_contiain').append(html) }) $('.pub_contiain').on('click', '.video_bg', function () { $(this).remove() }) $('.pub_contiain').on('click', 'video', function (e) { e.stopPropagation() }) $('.pub_contiain').append('
') // 杩斿洖椤堕儴 $(document).on('click', '.reTop', function () { $('html , body').animate({ scrollTop: 0 }, 'slow'); }) // 杩斿洖涓婁竴椤 $(document).on('click', '.reGo', function () { window.history.go(-1) }) var p = 0, t = 0; //鍒濆鍊 var downflag = 5; //婊氬姩娆℃暟 $(window).scroll(function () { var p = $(this).scrollTop(); var scrollHeight = $(document).height(); var windowHeight = $(this).height(); var footHeight = $('.pub_footer').height() if (t <= p) { if (downflag) { if (p + windowHeight >= scrollHeight - footHeight) { console.log('鍔犺浇'); downflag = 0; } } // console.log('涓嬫粴') } else { downflag = 5; // console.log('涓婃粴') } setTimeout(function () { t = p; }, 0); }) }); // $(function () { // var img_src = [] // var img_list = ['.head', '.partner_banner', '.banner_top'] // if (img_list.length) { // for (let i = 0; i < img_list.length; i++) { // if ($(img_list[i]).length) { // var headImg = $(img_list[i]).css("background-image").split("\"")[1] // img_src.push(headImg) // } // } // } // if ($(".swiper-slide").length) { // for (let i = 0; i < $(".swiper-slide").length; i++) { // if ($(".swiper-slide").eq(i).find('img').length) { // img_src.push($(".swiper-slide").eq(i).find('img').attr('src')) // } // } // } // if ($('.mapBanner').length) { // for (let i = 0; i < $(".mapBanner").length; i++) { // img_src.push($(".mapBanner").css("background-image").split("\"")[1]) // } // } // for (let i = 0; i < img_src.length; i++) { // $('.pub_contiain').append(``) // } // $(".pub_contiain").append(``) // if (img_src.length > 0) { // $('.load_popup').show() // } // var loadType = true // var loadTime = setInterval(function () { // if (loadType) { // $('.loading').css('transform', 'scale(-1)') // loadType = false // } else { // $('.loading').css('transform', 'scale(1)') // loadType = true // } // }, 2000) // var img_start = 1; // $(".imgload").load(function () { // img_start++; // console.log(img_start) // if (img_start > img_src.length) { // console.log('鍔犺浇瀹屾垚') // clearInterval(loadTime) // $('.load_popup').hide() // } // }) // });