//=== viewid:dh_style_01_1528703354992,dh_style_11_1530850445645 ===// /*pc,手机显示隐藏*/ function is_mobile(){ return window.screen.width<767 || ($('body').width() > 0 && $('body').width() < 767); } var is_mobile_boolean = is_mobile(); $(function(){ /*pc,手机显示隐藏*/ }) //=== viewid:lang_style_1_1528956310183 ===// $(document).ready(function(){ }); //=== viewid:dh_style_11_1530850445645 ===// 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_11_1530850445645(){ $("#dh_style_11_1530850445645 .menuUl>li").each(function(){ $(this).find(".menuUl03").css("left",'100%'); }) } $(window).resize(function() { subLeft_dh_style_11_1530850445645(); }) $(function(){ $("#dh_style_11_1530850445645 .fa-navicon").click(function(){ $("#dh_style_11_1530850445645").addClass('clearTransform'); $("#dh_style_11_1530850445645 .menuUlCopy").each(function(){ $(this).siblings(".fa").show(); }) }) subLeft_dh_style_11_1530850445645(); $("#dh_style_11_1530850445645 .subBox").css("top",$("#dh_style_11_1530850445645 .menuUl_box").height()); if($("#dh_style_11_1530850445645 .menuUl").hasClass("noHover")){ var tabNum = 0; $("#dh_style_11_1530850445645 .menuUl>li").find(".Onsub").each(function(){ tabNum += 1; $(this).parent().attr("tabNum",tabNum) }) $("#dh_style_11_1530850445645 .menuUl>li .Onsub").mouseover(function(){ $("#dh_style_11_1530850445645 .subBox").show(); var index = $(this).parent().attr("tabNum"); $("#dh_style_11_1530850445645 .subBox .subItems").eq(index-1).fadeIn(100).siblings().hide(); $("#dh_style_11_1530850445645 .subBox .subMenuImgArea .subMenuImgCon").eq(0).fadeIn(100).siblings().hide(); }) $("#dh_style_11_1530850445645 .subBox").mouseleave(function(){ $(this).hide(); }); $("#dh_style_11_1530850445645 .menuUl>li .Nosub").mouseover(function(){ $("#dh_style_11_1530850445645 .subBox").hide(); }) //风格41 42 } }) //=== viewid:homelink_style_01_1486374044927,homelink_style_01_1486433563894,homelink_style_01_1486439674348,homelink_style_01_1486538872897,homelink_style_01_1486620101523,productList_style_01_1484794941232 ===// //=== viewid:searchbox_style_01_1523500388418 ===// $("#searchbox_style_01_1523500388418 .search-btn").click(function(){ var kw=$("#searchbox_style_01_1523500388418 .search_input").val(); var gourl = $(this).attr("attrhref"); href = gourl+(gourl.indexOf('?')>-1?'&':'?')+"pkeyword="+kw; location.href = href; }) function searchOne(lname){ var gourl = $(lname).attr("attrhref"); href = gourl+(gourl.indexOf('?')>-1?'&':'?')+"pkeyword="+$(lname).html(); location.href = href; } $("#searchbox_style_01_1523500388418 .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_1484794941232 ===// var sys_url_productList_style_01_1484794941232="viewid=productList_style_01_1484794941232&name=productList&style=style_01&langid=0&pageid=1274211&viewCtrl=default"; //=== viewid:productList_style_01_1484794941232 ===// //-- $(function(){ var viewid="productList_style_01_1484794941232"; var sys_url="viewid=productList_style_01_1484794941232&name=productList&style=style_01&langid=0&pageid=1274211&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_1484794941232; } } RequestURL(viewid,sys_url,moreParams); }); //-- //=== viewid:productList_style_01_1484794941232 ===// var showSub = '0'; //=== viewid:productList_style_01_1484794941232 ===// 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://admin.9qu.com.cn/exusers/u_cart.php?idweb=30967&lang="+lang+"&pid="+pid+"&act=add&ismobile=1" + packStr; if (idspecprice) locationUrl += "&IDSpecPrice["+pid+"]="+idspecprice; if (isNaN(pid)) {//如果不是数字,表示批量加入购物车 locationUrl = "https://admin.9qu.com.cn/exusers/u_cart.php?idweb=30967&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://admin.9qu.com.cn/exusers/u_cart.php?idweb=30967&pid="+pid+"&act=add&lang="+lang+"&ispc=1" + packStr; if (idspecprice) locationUrl += "&IDSpecPrice["+pid+"]="+idspecprice; if (isNaN(pid)) {//如果不是数字,表示批量加入购物车 locationUrl = "https://admin.9qu.com.cn/exusers/u_cart.php?idweb=30967&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_1484794941232 .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天0时0分0秒'); } } //=== viewid:prodKind_style_04_1523436031806,prodKind_style_04_1523433230912 ===// $(document).ready(function(){ }); //=== viewid:prodKind_style_04_1523433230912 ===// function clickli(){ var pid=""; var pgids='0'; $(".level1[pid="+pgids+"]").find("em").trigger("click"); if($(".level1[pid="+pgids+"]").length==0) $(".le2[pid="+pgids+"]").parents(".level1").find("em").trigger("click"); } window.onload = function() { var pid=""; var pgids='0'; if(!pgids) pgids=Request('pgid'); console.log("pid:"+pid); console.log("pgids:"+pgids); setTimeout('clickli()', 1000); if(pgids) $(".level1[pid="+pgids+"]").find("em").trigger("click"); if($(".level1[pid="+pgids+"]").length==0) $(".le2[pid="+pgids+"]").parents(".level1").find("em").trigger("click"); } //=== viewid:prodKind_style_04_1523433230912 ===// //-- $(function(){ var viewid="prodKind_style_04_1523433230912"; var sys_url="viewid=prodKind_style_04_1523433230912&name=prodKind&style=style_04&langid=0&pageid=1274211&viewCtrl=prodKind&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.moreParamsprodKind_style_04_1523433230912; } } RequestURL(viewid,sys_url,moreParams); }); //-- //=== viewid:prodKind_style_04_1523433230912 ===// $(document).ready(function(){ $(function(){ var obj = $("#prodKind_style_04_1523433230912"); let timeout; obj.find(".prodcateStyle_4 .sidebar").click(function(e){ if($(this).children(".newscate2").css('display')=='none'){ $(this).siblings().find(".newscate2,.newscate3").hide(); $(this).children(".newscate2").show(); }else{ $(this).find(".newscate2,.newscate3").hide(); e.stopPropagation(); } diyAutoHeight(this); }) obj.find(".prodcateStyle_4 .sidebar2").click(function(e){ e.stopPropagation(); }); obj.find(".prodcateStyle_4 .sidebar3").click(function(e){ e.stopPropagation(); }); if(document.body.clientWidth <= 640 ){ obj.find(".prodcateStyle_4 .sidebar2").click(function(e){ e.stopPropagation(); $(this).show(); $(this).children(".newscate3").toggle(); $(this).siblings().children(".newscate3").hide(); }); } if(document.body.clientWidth >= 641 ){ obj.find(".prodcateStyle_4 .sidebar2").mouseover(function(e){ clearTimeout(timeout) e.stopPropagation(); $(this).show(); $(this).children(".newscate3").show(); $(this).siblings().children(".newscate3").hide(); }); obj.find(".prodcateStyle_4 .sidebar2").mouseout(function(e){ e.stopPropagation(); $(this).show(); timeout = setTimeout(function(){ obj.find(".prodcateStyle_4 .sidebar2").children(".newscate3").hide(); },200) }); } }) }); //=== viewid:searchbox_style_01_1486950341460 ===// $("#searchbox_style_01_1486950341460 .search-btn").click(function(){ var kw=$("#searchbox_style_01_1486950341460 .search_input").val(); var gourl = $(this).attr("attrhref"); href = gourl+(gourl.indexOf('?')>-1?'&':'?')+"pkeyword="+kw; location.href = href; }) function searchOne(lname){ var gourl = $(lname).attr("attrhref"); href = gourl+(gourl.indexOf('?')>-1?'&':'?')+"pkeyword="+$(lname).html(); location.href = href; } $("#searchbox_style_01_1486950341460 .search_input").val(decodeURIComponent(Request("pkeyword"))); function goSearch(form) { console.log('form: ', form); $(form).find('.search-btn').trigger('click'); return false; } //=== viewid:share_style_03_1525922520212 ===// setTimeout(function () { $(function() { $("#share_style_03_1525922520212 .shareImage").proSocialShare({ content: '', url:window.location.href, title:document.title, viewid:"#share_style_03_1525922520212" }); }); }, 1000); // 分享微信 function showWeiXin(a) { $(a).parent().find('.wechat_qrcode').toggle(); }