$(function () { wowInt(); findTel(); phoneTargetSelf(); nav(); search(); public_ajax(); select(); invest03(); $(document).on("click",".ll_re dl dt",function(e){ e.preventDefault(); e.stopPropagation(); $(this).siblings().slideToggle(); }) $(document).click(function(){ $(".ll_re dl dd").slideUp(); }) //顶部悬浮 $(window).scroll(function(){ if($(window).scrollTop()>0){ $("body").addClass("scroll-header"); }else{ $("body").removeClass("scroll-header"); } }) if($(window).width()>767){ var h_max = 0; $('.conn-part02 li').each(function() { var h = $(this).height(); h_max = h > h_max ? h : h_max; }); $('.conn-part02 li').height(h_max); } var src = $(".summary_l").find("img").attr("src"); if(src=="../images/error.png"){ $(".summary_l").hide(); } else{ //console.log(1) } //手机端底部 if($(window).width()<769){ $(".foot_top li").map(function(){ if($(this).children(".con").length>0){ $(this).addClass("has_con"); } }) $(document).on('click','.foot_top li.has_con h2',function(){ $(this).parent("li").siblings().removeClass("on"); $(this).parent("li").siblings().find(".con").slideUp(); $(this).parent("li").toggleClass("on"); $(this).parent("li").find(".con").slideToggle(); }) } //end //公共选项卡 $(".tab-box .tab-a").each(function() { $(this).click(function() { if (!$(this).hasClass("off")) { $(this).addClass("on").siblings().removeClass("on"); var ii=$(this).index(); $(this).parents(".tab-box").find(".tab-b").eq(ii).show().siblings().hide(); $('.counter').countUp({ delay: 10, time: 1000 }); } }); }) $(".tab-box").each(function (i) { $(this).find(".tab-a:eq(0)").click(); }); //end if($(window).width()>767){ $(".news-part01 .rr li").mouseenter(function() { $(this).addClass("on").siblings().removeClass("on"); var ii=$(this).index(); $(this).parents(".news-part01").find(".ll li").eq(ii).show().siblings().hide(); }) $(".news-part01 .rr li:eq(0)").mouseenter(); } else{ news_slide01(); } }) function news_slide01() { var n01Swiper = new Swiper('.news-part01 .swiper-container', { autoplay: false, slidesPerView : 1, spaceBetween : 10, prevButton:'.news-part01 .swiper-button-prev', nextButton:'.news-part01 .swiper-button-next', }) } function invest03(){ var inp03Swiper = new Swiper('.invest-part03 .swiper-container',{ slidesPerView : 3, slidesPerGroup : 1, spaceBetween : 48, prevButton:'.invest-part03 .swiper-button-prev', nextButton:'.invest-part03 .swiper-button-next', breakpoints: { 767: { slidesPerView: 1, spaceBetween: 10 } } }) if($(window).width()>767){ if($(".invest-part03 .swiper-slide").size()<=3){ $(".invest-part03 .swiper-button-prev,.invest-part03 .swiper-button-next").hide(); } } } function select(){ $(".select-box").each(function (i) { $(this).find("dt").click(function (e) { e.preventDefault(); e.stopPropagation(); var el = $(this).parent(".select-box"); if(el.hasClass('open')){ el.removeClass('open'); el.find("dd").stop().slideUp(); }else{ el.addClass('open'); el.find("dd").stop().slideDown(); //el.parents("li").siblings("li").find(".select-box").removeClass('open'); } }) $(".select-box").eq(i).find("dd a").each(function (x) { $(this).click(function () { var inde = $(this).index(); $(this).addClass("on").siblings().removeClass("on"); var el = $(".select-box.open"); el.next(".select-hidden").val($(this).attr("data-val")) el.find("dt a").html($(this).html()); el.find("dd a").eq(inde).addClass("on").siblings().removeClass("on"); setTimeout(function () { el.removeClass("open"); el.find("dd").stop().slideUp(); },1) }) }) }) $(document).click(function () { $(".select-box.open").removeClass("open"); $(".select-box.open").find("dd").stop().slideUp(); }) } function commAjax(str,url){ $.ajax({ url:url, success:function(msg){ $(str).html(""); $(str).append(msg); } }); } //主导航 function nav(){ if($(window).width()>1024){ $(".nav ul>li").hover(function() { $(this).find(".navlist").stop().slideDown(); $(this).find("dl").css("left",$(this).offset().left + 32); //console.log($(this).offset().left) $(".bus_nav .ll p").eq(0).addClass("has_rr"); $(".bus_nav .ll p").eq(1).addClass("has_rr"); $(".bus_nav .ll p").eq(2).addClass("has_rr"); $(".bus_nav .ll p").eq(3).addClass("has_rr"); $(".bus_nav .ll p.has_rr").removeClass("on"); $(".bus_nav .ll p.has_rr").eq(0).addClass("on"); $(".bus_nav ol").hide(); $(".bus_nav ol").eq(0).show(); }, function() { $(this).find(".navlist").stop().slideUp(); }); $(".bus_nav .ll p").hover(function() { $(this).addClass("on").siblings().removeClass("on"); if(!$(this).hasClass("has_rr")){ $(".bus_nav ol").hide(); return false; } else{ var ii =$(this).index(); $(".bus_nav ol").eq(ii).show().siblings().hide(); } }, function() { }); }else{ $(".navlist").siblings("span").addClass("cur"); $(document).on('click','.nav_phone_btn',function(e){ e.preventDefault(); e.stopPropagation(); $('.nav_phone_btn').toggleClass('visible_nav'); $('body').toggleClass('body_nav_phone'); $(".nav_click").show(); }); $(document).on('click','.nav_click',function(){ $('.nav_phone_btn').removeClass('visible_nav'); $('body').removeClass('body_nav_phone'); $(this).hide(); }) $(document).on('click','.nav ul li span',function(e){ $(this).parent("li").siblings().find("span").removeClass("on"); $(this).parent("li").siblings().find(".navlist").slideUp(); $(this).toggleClass("on"); $(this).siblings(".navlist").slideToggle(); }) } } // 地图 function mapInt(mapTitle,mapAdress,mapx,mapy){ var num = 0.001; var map = new BMap.Map("map"); var point = new BMap.Point(mapx+num,mapy); var point2 = new BMap.Point(mapx,mapy); var myIcon = new BMap.Icon("../images/dot09.png", new BMap.Size(27,36));// icon按钮 var marker2 = new BMap.Marker(point2,{icon:myIcon}); // 创建标注 map.addOverlay(marker2); // 将标注添加到地图中 map.centerAndZoom(point, 19); if($(window).width()<1024){ num = 0; map.centerAndZoom(point2, 19); } /*var opts = { width : 200, height: 100, title : "胜利油田大明集团" } var infoWindow = new BMap.InfoWindow("地址:山东省东营市东营区千佛山路20号", opts); // 创建信息窗口对象 marker2.addEventListener("click", function(){ map.openInfoWindow(infoWindow,point2); //开启信息窗口 });*/ map.enableScrollWheelZoom(); //启用滚轮放大缩小,默认禁用 map.enableContinuousZoom(); //启用地图惯性拖拽,默认禁用 } //--------------点击分享 function share(){ /* $(".share_in").click(function () {//linkedin var url = $(this).data("txt"); var url = window.location.href; var title = document.title; var op = "//www.linkedin.com/uas/login?title=" + title + "&url=" + encodeURIComponent(url) + ""; window.open(op); }) $(".share_qqkj").click(function () {//腾讯微博 var url = $(this).data("txt"); var url = window.location.href; var title = document.title; var op = "https://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?title=" + title + "&url=" + encodeURIComponent(url) + ""; window.open(op) })*/ $(".share_bdtb").click(function () {//百度贴吧 var url = $(this).data("txt"); var url = window.location.href; var title = document.title; var op = "http://tieba.baidu.com/f/commit/share/openShareApi?title=" + title + "&url=" + encodeURIComponent(url) + ""; window.open(op); }) $(".share_db").click(function () {//豆瓣 var url = $(this).data("txt"); var url = window.location.href; var title = document.title; var op = "https://www.douban.com/share/service?title=" + title + "&url=" + encodeURIComponent(url) + ""; window.open(op); }) $(".share_wb").click(function () {//微博 var url = $(this).data("txt"); var url = window.location.href; var title = document.title; var op = "http://service.weibo.com/share/share.php?title=" + title + "&url=" + encodeURIComponent(url) + ""; window.open(op) }) $(".share_qq").click(function () {//QQ var url = $(this).data("txt"); var url = window.location.href; var title = document.title; var op = "http://connect.qq.com/widget/shareqq/index.html?url=" + encodeURIComponent(url) + ""; window.open(op); }) //微信 $(".share_wx").attr("data-qrcode","http://www.xinhongru.com/qrcode/qrcode.php?content="+window.location.href); //$(".share_wx").attr("data-qrcode", "/qrCode/Index.aspx?url=" + window.location.href); $(".share_wx").click(function () {//微信 //var url = "/qrCode/Index.aspx?url=" + window.location.href; var url = $(this).attr("data-qrcode") console.log(url) var title = "" title += "
扫一扫
" title += "