$(function(){ glimpse_swi(); share(); pro_dslider(); if($(window).width()>1024){ $(".materials_03 ul li").eq(0).addClass("on"); $(".materials_03 ul li").hover(function(){ $(this).addClass("on").siblings().removeClass("on"); }) } $(document).on("click",".business_tab li",function(){ $(this).addClass("on").siblings().removeClass("on"); $(".business_pro ul").eq($(this).index()).show().siblings().hide(); }) var num =3; if($(window).width()<=1024){ num = 3; } if($(window).width()<=767){ num = 1; } if($(".smart_slider li").length>=1){ var brand3Swiper = new Swiper('.smart_slider .swiper-container', { slidesPerView:num, effect : 'slide', autoplay : false, speed:1000, spaceBetween:50, prevButton:'.smart_slider .swiper-button-prev', nextButton:'.smart_slider .swiper-button-next', loop: false, breakpoints:{ 1366: { spaceBetween:30, }, 1024: { spaceBetween:10, }, 767: { spaceBetween:0, }, } }) } if($(".smart_slider li").length>num){ $(".smart_slider .but_ljx").show(); } }) function glimpse_swi() { var _ind=0; var _len = $(".case_show_s .swiper-slide").length; var my_Swiper = new Swiper('.case_show_b .swiper-container',{ slidesPerView: 1,//设置slider容器能够同时显示的slides数量(carousel模式) spaceBetween: 0, // effect:'fade', noSwiping : true, prevButton:'.case_show_b .swiper-button-prev', nextButton:'.case_show_b .swiper-button-next', observer:true, observeParents:true, onInit: function(swiper){ // console.log(_ind) swiper.slideTo(_ind,1000) }, breakpoints:{ 767: { spaceBetween:0, // noSwiping : false, }, } }) var case_Swiper = new Swiper('.case_show_s .swiper-container',{ slidesPerView: 4,//设置slider容器能够同时显示的slides数量(carousel模式) spaceBetween: 8,//slide之间的距离(单位px)。 prevButton:'.case_show_s .swiper-button-prev', nextButton:'.case_show_s .swiper-button-next', noSwiping : true, observer:true, observeParents:true, breakpoints:{ 1024: { slidesPerView: 4, spaceBetween:5 } } }) $(".case_show_s .swiper-button-prev").addClass("disabled"); $(".case_show_s .swiper-button-prev").click(function(){ _ind--; btnJudge(); $(".case_show_s .swiper-slide").eq(_ind).addClass("on").siblings().removeClass("on"); my_Swiper.slideTo(_ind, 1000, false); }) $(".case_show_s .swiper-button-next").click(function(){ _ind++; btnJudge(); $(".case_show_s .swiper-slide").eq(_ind).addClass("on").siblings().removeClass("on"); my_Swiper.slideTo(_ind, 1000, false); }) $(".case_show_s .swiper-slide").click(function(){ $(this).addClass("on").siblings().removeClass("on"); _ind = $(this).index(); btnJudge(); my_Swiper.slideTo(_ind, 1000, false); }) // $(".case_show_s .swiper-slide:eq(1)").click(); function btnJudge() { if(_ind >= _len - 1) { $('.case_show_s .swiper-button-next').addClass("disabled") _ind = _len - 1; } else { $('.case_show_s .swiper-button-next').removeClass("disabled") } if(_ind <= 0) { $(".case_show_s .swiper-button-prev").addClass("disabled") _ind = 0; } else { $(".case_show_s .swiper-button-prev").removeClass("disabled") } } if($(".case_show_s li").length>4){ $(".case_show_s .but_ljx").show(); } } //--------------点击分享 function share(){ $(".share_facebook").click(function () {//Facebook var url = $(this).data("txt"); var url = window.location.href; var title = document.title; var op = "https://www.facebook.com/sharer.php?s=100&p[title]=" + title + "&p[summary]=!&p[url]=" + encodeURIComponent(url) + "" window.open(op) }) $(".share_twitter").click(function () {//Twitter var url = $(this).data("txt"); var url = window.location.href; var title = document.title; var op = "https://www.tumblr.com/login?redirect_to=https://www.tumblr.com/widgets/share/tool?shareSource=legacy&canonicalUrl=&url=" + encodeURIComponent(url) + "&title=" + title + ""; 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_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_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_douban").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_bd").click(function () {//百度贴吧 var url = $(this).data("txt"); var url = window.location.href; var title = document.title; var op = "http://s.share.baidu.com/mshare?url=" + title + "&url=" + encodeURIComponent(url) + ""; window.open(op); }) //微信 $(".share_wx").attr("data-qrcode","http://www.xinhongru.com/qrcode/qrcode.php?content="+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 += "x" title += "

二维码

" title += "
" title += "

扫一扫

" title += "
" $("body").remove(".weixin"); $("body").append(title) }) $(document).on("click", ".weixin .c", function () { $(".weixin").remove(); }) } function mapInt(mapTitle,mapAdress,mapx,mapy){ var num = 0.002; var num2 = 0.0005; var map = new BMap.Map("map"); var point = new BMap.Point(mapx+num,mapy-num2); var point2 = new BMap.Point(mapx,mapy); var myIcon = new BMap.Icon("../images/address.png", new BMap.Size(65,65));// icon鎸夐挳 var marker2 = new BMap.Marker(point2,{icon:myIcon}); // 鍒涘缓鏍囨敞 map.addOverlay(marker2); // 灏嗘爣娉ㄦ坊鍔犲埌鍦板浘涓� map.centerAndZoom(point, 16); if($(window).width()<1024){ num = 0; map.centerAndZoom(point2, 20); } var opts = { width : 200, // 淇℃伅绐楀彛瀹藉害 height: 100, // 淇℃伅绐楀彛楂樺害 title : mapTitle // 淇℃伅绐楀彛鏍囬 } map.enableScrollWheelZoom(); //鍚敤婊氳疆鏀惧ぇ缂╁皬锛岄粯璁ょ鐢� map.enableContinuousZoom(); //鍚敤鍦板浘鎯€ф嫋鎷斤紝榛樿绂佺敤 } $(function(){ // countrylist(); }) function pro_dslider(){ if($(".pro_dslider li").length>1){ var brand3Swiper = new Swiper('.pro_dslider .swiper-container', { slidesPerView: 1,//设置slider容器能够同时显示的slides数量(carousel模式) slidesPerGroup: 1,//在carousel mode下定义slides的数量多少为一组。 loop:true, spaceBetween:0,//slide之间的距离(单位px)。 prevButton:'.pro_dslider .swiper-button-prev', nextButton:'.pro_dslider .swiper-button-next', pagination: '.pro_dslider .swiper-pagination', paginationClickable :true }) } }