//=== viewid:dh_style_01_1514430255311 ===// /*pc,鎵嬫満鏄剧ず闅愯棌*/ function is_mobile(){ return window.screen.width<767 || ($('body').width() > 0 && $('body').width() < 767); } var is_mobile_boolean = is_mobile(); $(function(){ /*pc,鎵嬫満鏄剧ず闅愯棌*/ }) //=== viewid:dh_style_01_1514430255311 ===// function navSwtich(obj) { $(obj).siblings(".menuUlCopy").slideToggle(200); $(obj).toggleClass('ontoggle'); $(obj).parent().siblings().find(".menuUlCopy").slideUp(200); $(obj).parent().siblings().find(".fa-angle-down").removeClass('ontoggle'); } function subLeft_dh_style_01_1514430255311(){ $("#dh_style_01_1514430255311 .menuUl>li").each(function(){ $(this).find(".menuUl03").css("left",'100%'); }) } $(window).resize(function() { subLeft_dh_style_01_1514430255311(); }) $(function(){ $("#dh_style_01_1514430255311 .fa-navicon").click(function(){ $("#dh_style_01_1514430255311").addClass('clearTransform'); $("#dh_style_01_1514430255311 .menuUlCopy").each(function(){ $(this).siblings(".fa").show(); }) }) subLeft_dh_style_01_1514430255311(); $("#dh_style_01_1514430255311 .subBox").css("top",$("#dh_style_01_1514430255311 .menuUl_box").height()); if($("#dh_style_01_1514430255311 .menuUl").hasClass("noHover")){ var tabNum = 0; $("#dh_style_01_1514430255311 .menuUl>li").find(".Onsub").each(function(){ tabNum += 1; $(this).parent().attr("tabNum",tabNum) }) $("#dh_style_01_1514430255311 .menuUl>li .Onsub").mouseover(function(){ $("#dh_style_01_1514430255311 .subBox").show(); var index = $(this).parent().attr("tabNum"); $("#dh_style_01_1514430255311 .subBox .subItems").eq(index-1).fadeIn(100).siblings().hide(); $("#dh_style_01_1514430255311 .subBox .subMenuImgArea .subMenuImgCon").eq(0).fadeIn(100).siblings().hide(); }) $("#dh_style_01_1514430255311 .subBox").mouseleave(function(){ $(this).hide(); }); $("#dh_style_01_1514430255311 .menuUl>li .Nosub").mouseover(function(){ $("#dh_style_01_1514430255311 .subBox").hide(); }) //椋庢牸41 42 } }) //=== viewid:searchbox_style_01_1541940675935 ===// $("#searchbox_style_01_1541940675935 .search-btn").click(function(){ var kw=$("#searchbox_style_01_1541940675935 .search_input").val(); var gourl = $(this).attr("attrhref"); href = gourl+(gourl.indexOf('?')>-1?'&':'?')+"pkeyword="+kw; window.open(href); }) function searchOne(lname){ var gourl = $(lname).attr("attrhref"); href = gourl+(gourl.indexOf('?')>-1?'&':'?')+"pkeyword="+$(lname).html(); window.open(href); } $("#searchbox_style_01_1541940675935 .search_input").val(decodeURIComponent(Request("pkeyword"))); function goSearch(form) { console.log('form: ', form); $(form).find('.search-btn').trigger('click'); return false; } //=== viewid:productList_style_01_1542003933788 ===// //-- $(function(){ var viewid="productList_style_01_1542003933788"; var sys_url="viewid=productList_style_01_1542003933788&name=productList&style=style_12_1&langid=0&pageid=64928&viewCtrl=default&isfb=1"; var moreParams=''; if(typeof(history.pushState) != 'undefined'){ var hstate=JSON.stringify(history.state); if(hstate!='null'&& hstate!=null){ eval('var hjson = ' + hstate); moreParams=hjson.moreParamsproductList_style_01_1542003933788; } } RequestURL(viewid,sys_url,moreParams); }); //-- //=== viewid:productList_style_01_1542003933788 ===// var showSub = '0'; //=== viewid:productList_style_01_1542003933788 ===// //=== viewid:productList_style_01_1542003933788 ===// if(typeof addcart !== 'function'){ function addcart(pid,is_virtual,idspecprice,idpackage){ var lang=0; if(lang == '0'){ lang = Default_isFT; if(BodyIsFt == '0'){ lang = BodyIsFt; }else if(BodyIsFt == '1'){ lang = BodyIsFt; } } var packStr = ''; if(typeof (idpackage) != 'undefined'){ packStr = "&idpackage="+idpackage; } if(is_mobile()){ var locationUrl = "https://s207js.nicebox.cn/exusers/u_cart.php?idweb=5346&lang="+lang+"&pid="+pid+"&act=add&ismobile=1" + packStr; if (idspecprice) locationUrl += "&IDSpecPrice["+pid+"]="+idspecprice; if (isNaN(pid)) {//濡傛灉涓嶆槸鏁板瓧锛岃〃绀烘壒閲忓姞鍏ヨ喘鐗╄溅 locationUrl = "https://s207js.nicebox.cn/exusers/u_cart.php?idweb=5346&lang="+lang+"&act=add&ismobile=1" + pid + (idspecprice ? idspecprice : ""); } var res = "0"; if(res == '1' && is_virtual == 0){ locationUrl+= "&use_ajax=1&callback=?"; $.getJSON(locationUrl,function(ret){ if(ret.i_AddFlag){ $.alerts.dialogClass = 'success'; alert(ret.message); } }); }else{ window.location = locationUrl; } }else{ var locationUrl = "https://s207js.nicebox.cn/exusers/u_cart.php?idweb=5346&pid="+pid+"&act=add&lang="+lang+"&ispc=1" + packStr; if (idspecprice) locationUrl += "&IDSpecPrice["+pid+"]="+idspecprice; if (isNaN(pid)) {//濡傛灉涓嶆槸鏁板瓧锛岃〃绀烘壒閲忓姞鍏ヨ喘鐗╄溅 locationUrl = "https://s207js.nicebox.cn/exusers/u_cart.php?idweb=5346&lang="+lang+"&act=add&ispc=1" + pid + (idspecprice ? idspecprice : ""); } document.getElementById("boxName").innerHTML="鍔犲叆璐墿杞?; if(document.getElementById("boxClose")) document.getElementById("boxClose").innerHTML="脳"; document.getElementById("showiframe").src=locationUrl; box.Show({width:"840px",height:"420px"}); } } } function is_mobile(){ return window.screen.width<767 || ($('body').width() > 0 && $('body').width() < 767); } $(function(){ $('#productList_style_01_1542003933788 .prod_infos .end_time').each(function(){ purchase_clock(this);//寮€鍚€掕鏃 }); }); //鎷艰喘鍊掕鏃 function purchase_clock(obj) { var time = parseInt($(obj).attr('data-time')); if (time > 0) { var str = ''; var num = 0; num = parseInt(time/86400); if(num > 0)str += num.toString() + '澶?; time -= num * 86400; num = parseInt(time/3600); if(num > 0)str += num.toString() + '鏃?; time -= num * 3600; num = parseInt(time/60); if(num > 0)str += num.toString() + '鍒?; time -= num * 60; if(num > 0)str += time.toString() + '绉?; $(obj).text(str).attr('data-time', parseInt($(obj).attr('data-time')) - 1); setTimeout(function(){ purchase_clock(obj); }, 1000); } else { $(obj).text('0澶?鏃?鍒?绉?); } } //=== viewid:video_style_01_1544413903769,newsKind_style_01_1542072280732 ===// $(document).ready(function(){ }); //=== viewid:video_style_01_1544413903769 ===// $(function(){ if('false' == 'true' || '0' == '1'){ //鑷姩鎾斁鎴栭€夋嫨棣栧抚鍋氬皝闈 let u = navigator.userAgent; let isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //android缁堢 let isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios if(isAndroid){ setTimeout(function(){ document.getElementById("myVideovideo_style_01_1544413903769").addEventListener("durationchange", androidShow());},300); }else if(isiOS){ iosShow(); } } function androidShow(){ let $videovideo_style_01_1544413903769 = $("#myVideovideo_style_01_1544413903769"); setTimeout(function(){ $videovideo_style_01_1544413903769[0].play(true); if('false' != 'true'){ //閫夋嫨棣栧抚鍋氬皝闈㈡椂鍊欐殏鍋滐紝鑷姩鎾斁涓嶇敤鏆傚仠 let time = 0; let timer = setInterval(function(){ $videovideo_style_01_1544413903769[0].pause(true); time++; if($videovideo_style_01_1544413903769[0].paused && time>=6 ){ clearInterval(timer); } },100); } },50); } function iosShow(){ if (window.WeixinJSBridge) { doPlayvideo_style_01_1544413903769(); if('false' != 'true'){ //閫夋嫨棣栧抚鍋氬皝闈㈡椂鍊欐殏鍋滐紝鑷姩鎾斁涓嶇敤鏆傚仠 setTimeout(function(){ doPausevideo_style_01_1544413903769(); },50); } } else { document.addEventListener("WeixinJSBridgeReady", function(){ doPlayvideo_style_01_1544413903769(); if('false' != 'true'){ //閫夋嫨棣栧抚鍋氬皝闈㈡椂鍊欐殏鍋滐紝鑷姩鎾斁涓嶇敤鏆傚仠 setTimeout(function(){ doPausevideo_style_01_1544413903769(); },50); } }, false); } } function doPlayvideo_style_01_1544413903769(){ WeixinJSBridge.invoke('getNetworkType', {}, function (e) { let $videovideo_style_01_1544413903769 = $("#myVideovideo_style_01_1544413903769") $videovideo_style_01_1544413903769[0].play(true) }) } function doPausevideo_style_01_1544413903769(){ WeixinJSBridge.invoke('getNetworkType', {}, function (e) { let $videovideo_style_01_1544413903769 = $("#myVideovideo_style_01_1544413903769") $videovideo_style_01_1544413903769[0].pause(true) }) } $("#myVideovideo_style_01_1544413903769")[0].addEventListener("play", function(){//鎾斁浜嬩欢 $("#myVideovideo_style_01_1544413903769")[0].setAttribute('poster', ''); }); }) //=== viewid:video_style_01_1544413903769 ===// var video = $("#video_style_01_1544413903769 video")[0]; if(video) { video.addEventListener('playing',function(){ var this1 = this; this1.play(); for(var j=$('video').length-1; j>=0; j--) { var this2 = $('video')[j]; if(this1 !== this2) { this2.pause(); } } }); } //=== viewid:newsKind_style_01_1542072280732 ===// $(function(){ var obj = $("#newsKind_style_01_1542072280732"); obj.find(".newscateStyle_1 .sidebar").click(function(){ if($(this).children(".newscate2").css('display')=='none'){ $(this).siblings().find(".newscate2,.newscate3").hide(); $(this).children(".newscate2").show(); }else{ $(this).children(".newscate2").hide(); } diyAutoHeight(this); }) obj.find(".newscateStyle_1 .sidebar2").click(function(){ event.stopPropagation(); $(this).children(".newscate3").toggle(); $(this).siblings().find('.newscate3').hide(); $(this).parents('.sidebar').siblings().find('.newscate3').hide(); }) obj.find(".newscateStyle_1 .sidebar2 .sidebar3").click(function(){ event.stopPropagation(); }) }) //=== viewid:newsKind_style_01_1542072280732 ===// //-- $(function(){ var viewid="newsKind_style_01_1542072280732"; var sys_url="viewid=newsKind_style_01_1542072280732&name=newsKind&style=style_01&langid=0&pageid=64928&viewCtrl=newsCate&isfb=1"; var moreParams=''; if(typeof(history.pushState) != 'undefined'){ var hstate=JSON.stringify(history.state); if(hstate!='null'&& hstate!=null){ eval('var hjson = ' + hstate); moreParams=hjson.moreParamsnewsKind_style_01_1542072280732; } } RequestURL(viewid,sys_url,moreParams); }); //-- //=== viewid:newsList_style_01_1542249143686 ===// var sys_url_newsList_style_01_1542249143686="viewid=newsList_style_01_1542249143686&name=newsList&style=style_04&langid=0&pageid=64928&viewCtrl=newsList"; //=== viewid:newsList_style_01_1542249143686 ===// //-- $(function(){ var viewid="newsList_style_01_1542249143686"; var sys_url="viewid=newsList_style_01_1542249143686&name=newsList&style=style_04&langid=0&pageid=64928&viewCtrl=newsList&isfb=1"; var moreParams=''; if(typeof(history.pushState) != 'undefined'){ var hstate=JSON.stringify(history.state); if(hstate!='null'&& hstate!=null){ eval('var hjson = ' + hstate); moreParams=hjson.moreParamsnewsList_style_01_1542249143686; } } RequestURL(viewid,sys_url,moreParams); }); //-- //=== viewid:banner_style_03_1542072609532 ===// //=== viewid:banner_style_03_1542072609532 ===// $(document).ready(function(){ var datestay=parseFloat('3')*1000; var timeAnimi=parseFloat('0.5')*1000; var obj=$("#banner_style_03_1542072609532"); if(obj&&obj.length>0){ var timeoutObj=null; var nowItem=0; var father=obj.find(".bannerStyle_5 .main_image ul"); var Ulen = father.children("li").length; //鍒濆鍖栬鍥 father.children("li").eq(nowItem).css({"display":"block","float":"none","left":"0%","top":"0px","position":"absolute"}).siblings("li").css({"display":"block","float":"none","left":"100%","top":"0px","position":"absolute"}); obj.find(".bannerStyle_5 .flicking_con").children("a").eq(0).addClass("on").siblings().removeClass("on"); obj.find(".bannerStyle_5 .flicking_con").children("a").eq(0).find('span').addClass("altTipOn"); obj.find(".bannerStyle_5 .flicking_con").children("a").eq(0).siblings().find('span').removeClass("altTipOn"); obj.find(".bannerStyle_5 .flicking_con").children("a").css("width",100/Ulen+"%"); obj.find(".bannerStyle_5 .flicking_con").children("a").click(function(){ if(Ulen>1 && $(this).index() != nowItem){ var now=nowItem; var next=$(this).index(); obj.find(".bannerStyle_5 .flicking_con").children("a").eq(next).addClass("on").siblings().removeClass("on"); obj.find(".bannerStyle_5 .flicking_con").children("a").eq(next).find('span').addClass("altTipOn"); obj.find(".bannerStyle_5 .flicking_con").children("a").eq(next).siblings().find('span').removeClass("altTipOn"); father.children("li").eq(now).stop().animate({"left":"-100%"},timeAnimi,function(){ if(typeof(callback)=="function"){ timeoutObj=setTimeout(function(){ callback(callback); },datestay); } }); father.children("li").eq(next).css({"left":"100%"}).stop().animate({"left":"0%"},timeAnimi); nowItem=next; } }); obj.hover(function(){ if(timeoutObj){ window.clearTimeout(timeoutObj); } obj.find(".bannerStyle_5 #btn_prev, .bannerStyle_5 #btn_next").fadeIn() },function(){ timeoutObj=setTimeout(function(){ animiIn(animiIn); },datestay); obj.find(".bannerStyle_5 #btn_prev, .bannerStyle_5 #btn_next").fadeOut() }); $("#banner_style_03_1542072609532 .bannerStyle_5 #btn_prev").click(function(){ animiOut(); }); $("#banner_style_03_1542072609532 .bannerStyle_5 #btn_next").click(function(){ animiIn(); }); var touchVal=null; document.addEventListener("touchstart", function(e){ if($(e.target).is(obj)||$(e.target).parents("#"+obj.attr("id")).length>0){ touchVal={}; touchVal.downX=e.touches[0].clientX; if (e.preventDefault) { e.preventDefault(); } else { e.returnvalue = false; } } }, false); document.addEventListener("touchmove", function(e){ if(touchVal&&touchVal.downX){ touchVal.moveX=e.touches[0].clientX-touchVal.downX; if (e.preventDefault) { e.preventDefault(); } else { e.returnvalue = false; } } }, false); document.addEventListener("touchend", function(e){ if(touchVal&&touchVal.moveX){ if(touchVal.moveX>30){ animiOut(animiIn); }else if(touchVal.moveX<-30){ animiIn(animiIn); } if (e.preventDefault) { e.preventDefault(); } else { e.returnvalue = false; } } touchVal=null; }, false); function animiIn(callback){ if(timeoutObj){ window.clearTimeout(timeoutObj); } if(Ulen>1){ var now=nowItem; var next=now+1; if(next>=Ulen){ next=0; } obj.find(".bannerStyle_5 .flicking_con").children("a").eq(next).addClass("on").siblings().removeClass("on"); obj.find(".bannerStyle_5 .flicking_con").children("a").find("span").removeClass("altTipOn"); obj.find(".bannerStyle_5 .flicking_con").children("a.on").find("span").addClass("altTipOn"); father.children("li").eq(now).stop().animate({"left":"-100%"},timeAnimi,function(){ if(typeof(callback)=="function"){ timeoutObj=setTimeout(function(){ callback(callback); },datestay); } }); father.children("li").eq(next).css({"left":"100%"}).stop().animate({"left":"0%"},timeAnimi); nowItem=next; } } function animiOut(){ if(timeoutObj){ window.clearTimeout(timeoutObj); } if(Ulen>1){ var now=nowItem; var next=now-1; if(next<0){ next=Ulen-1; } obj.find(".bannerStyle_5 .flicking_con").children("a").eq(next).addClass("on").siblings().removeClass("on"); obj.find(".bannerStyle_5 .flicking_con").children("a").find("span").removeClass("altTipOn"); obj.find(".bannerStyle_5 .flicking_con").children("a.on").find("span").addClass("altTipOn"); father.children("li").eq(now).stop().animate({"left":"100%"},timeAnimi,function(){ if(typeof(callback)=="function"){ timeoutObj=setTimeout(function(){ callback(callback); },datestay); } }); father.children("li").eq(next).css({"left":"-100%"}).stop().animate({"left":"0%"},timeAnimi); nowItem=next; } } timeoutObj=setTimeout(function(){ animiIn(animiIn); },datestay); } }); //=== viewid:newsList_style_01_1551171577696 ===// //-- $(function(){ var viewid="newsList_style_01_1551171577696"; var sys_url="viewid=newsList_style_01_1551171577696&name=newsList&style=style_01&langid=0&pageid=64928&viewCtrl=newsList&isfb=1"; var moreParams=''; if(typeof(history.pushState) != 'undefined'){ var hstate=JSON.stringify(history.state); if(hstate!='null'&& hstate!=null){ eval('var hjson = ' + hstate); moreParams=hjson.moreParamsnewsList_style_01_1551171577696; } } RequestURL(viewid,sys_url,moreParams); }); //--