//=== viewid:dh_style_11_1547122568954,dh_style_28_1692335372111,dh_style_28_1692335876140,dh_style_28_1692264276315,dh_style_28_1692264307738,dh_style_28_1692335387158,dh_style_28_1610608763424,dh_style_28_1692334971057 ===// /*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_11_1547122568954 ===// 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_1547122568954(){ $("#dh_style_11_1547122568954 .menuUl>li").each(function(){ $(this).find(".menuUl03").css("left",'100%'); }) } $(window).resize(function() { subLeft_dh_style_11_1547122568954(); }) $(function(){ $("#dh_style_11_1547122568954 .fa-navicon").click(function(){ $("#dh_style_11_1547122568954").addClass('clearTransform'); $("#dh_style_11_1547122568954 .menuUlCopy").each(function(){ $(this).siblings(".fa").show(); }) }) subLeft_dh_style_11_1547122568954(); $("#dh_style_11_1547122568954 .subBox").css("top",$("#dh_style_11_1547122568954 .menuUl_box").height()); if($("#dh_style_11_1547122568954 .menuUl").hasClass("noHover")){ var tabNum = 0; $("#dh_style_11_1547122568954 .menuUl>li").find(".Onsub").each(function(){ tabNum += 1; $(this).parent().attr("tabNum",tabNum) }) $("#dh_style_11_1547122568954 .menuUl>li .Onsub").mouseover(function(){ $("#dh_style_11_1547122568954 .subBox").show(); var index = $(this).parent().attr("tabNum"); $("#dh_style_11_1547122568954 .subBox .subItems").eq(index-1).fadeIn(100).siblings().hide(); $("#dh_style_11_1547122568954 .subBox .subMenuImgArea .subMenuImgCon").eq(0).fadeIn(100).siblings().hide(); }) $("#dh_style_11_1547122568954 .subBox").mouseleave(function(){ $(this).hide(); }); $("#dh_style_11_1547122568954 .menuUl>li .Nosub").mouseover(function(){ $("#dh_style_11_1547122568954 .subBox").hide(); }) //风格41 42 } }) //=== viewid:searchbox_style_03_1594112302943 ===// $("#searchbox_style_03_1594112302943 .search-btn").click(function(){ var kw=$("#searchbox_style_03_1594112302943 .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_03_1594112302943 .search_input").val(decodeURIComponent(Request("pkeyword"))); function goSearch(form) { console.log('form: ', form); $(form).find('.search-btn').trigger('click'); return false; } //=== viewid:tab_style_03_1608001947942 ===// var SpecDebug = false; /** * @Content:获取某个区域(div id="#spec_{s_Hash}")所选择的各个规格所选中的 * @Author:zhaogh * @Version:10.0.0 * @Param:s_Hash varchar 区域特征 * @Return:[{DataIndex:0,DataVal:'#FFFFF'}] */ $.ajaxSetup({ cache: false }); function SpecCurSelect(s_Hash){ var arrReturn = []; var curArea = $("#spec_"+s_Hash); $(".sys_item_spec .sys_item_specpara",curArea).each(function(){ $("li",$(this)).each(function(){ if($(this).hasClass('selected')){ var curData = { 'DataIndex' : $(this).data('index'), 'DataVal' : $(this).data('aid'), }; arrReturn.push(curData); } }); }); return arrReturn; } function SpecGetAttrPrice(s_Hash,is_int){//是否取整 if(typeof(is_int)=="undefined") var is_int = 0; var curArea = $("#spec_"+s_Hash); var defaultstats=true; var _val=''; var _resp={ mktprice:".sys_item_mktprice", price:".sys_item_price" } $(".sys_item_spec .sys_item_specpara",curArea).each(function(){ var i=$(this); var v=i.attr("data-attrval"); if(!v){ defaultstats=false; }else{ _val+=_val!=""?"_":""; _val+=v; } }); var curResult = {}; if(!!defaultstats){ if(!sys_item['sys_attrprice'][s_Hash][_val]){ return false; } var curResult = sys_item['sys_attrprice'][s_Hash][_val]; _price = curResult['price']; var backprice = _price; //_price = sys_item['sys_attrprice'][s_Hash][_val]['price']; SpecIDSpecPriceSet(s_Hash,sys_item['sys_attrprice'][s_Hash][_val]['IDSpecPrice']); SpecIDSpecStockSet(s_Hash,sys_item['sys_attrnum'][s_Hash][_val]['num']); if(sys_item['sys_attrnum'][s_Hash][_val]['num']>0){//不是不限库存的 var curNum = parseInt($("#"+s_Hash+"_ProdNum").val()); if(!curNum || curNum<1)curNum = 1; var diffNum = sys_item['sys_attrnum'][s_Hash][_val]['num']-sys_item['sys_attrnum'][s_Hash][_val]['nums']; $("#"+s_Hash+"_ProdNum").attr('data-maxnum',diffNum); $('.snum').html('剩余库存'+diffNum+'件'); if(diffNum > 0){ $('.havnum').show(); $('.nonum').hide(); }else{ $('.havnum').hide(); $('.nonum').show(); } CheckStock(s_Hash); } }else{ var curResult = false; var allNum = 0; $.each(sys_item['sys_attrnum'][s_Hash],function(i,item){ allNum = allNum+parseInt(item.num); }); SpecIDSpecStockSet(s_Hash,allNum); //var curResult = sys_item['price'][s_Hash]; //_price = curResult['price']; //_mktprice = sys_item['mktprice']; _price = sys_item['price'][s_Hash]; var backprice = _price; } _price = price_format(_price); //输出价格 var newPriceObj = $("#"+sys_item['price_id'][s_Hash]['HTMLPriceNewID']); if(newPriceObj){ if(is_int==1){ if(typeof(_price)=='string') _price = _price.replace(/,/g, ""); _price = parseFloat(_price); _price = Math.round(_price); } newPriceObj.text(_price); } var oldPriceObj = $("#"+sys_item['price_id'][s_Hash]['HTMLPriceOldID']); if(oldPriceObj){ if(is_int==1){ var oldprice = sys_item['price_old'][s_Hash]; if(typeof(oldprice)=='string') sys_item['price_old'][s_Hash] = oldprice.replace(/,/g, ""); sys_item['price_old'][s_Hash] = parseFloat(sys_item['price_old'][s_Hash]); sys_item['price_old'][s_Hash] = Math.round(sys_item['price_old'][s_Hash]); } oldPriceObj.text(sys_item['price_old'][s_Hash]); } var packagePriceObj = $("#"+sys_item['price_id'][s_Hash]['HTMLPricePID']); if(packagePriceObj && curResult){ if(curResult['PackagePrice']){ if(is_int==1){ var PackagePrice = curResult['PackagePrice']; if(typeof(PackagePrice)=='string') curResult['PackagePrice'] = PackagePrice.replace(/,/g, ""); curResult['PackagePrice'] = parseFloat(curResult['PackagePrice']); curResult['PackagePrice'] = Math.round(curResult['PackagePrice']);//是否取整 } packagePriceObj.text(curResult['PackagePrice']); $(".packageTips").css("display","block"); }else{ packagePriceObj.text("无"); $(".packageTips").css("display","none"); } } var memberPriceObj = $("#"+sys_item['price_id'][s_Hash]['HTMLPriceMID']); if(memberPriceObj && curResult && curResult["mprice"]){ if(curResult['mprice']){ if(is_int==1){ var mprice = curResult['mprice']; if(typeof(mprice)=='string') curResult['mprice'] = mprice.replace(/,/g, ""); curResult['mprice'] = parseFloat(curResult['mprice']); curResult['mprice'] = Math.round(curResult['mprice']);//是否取整 } curResult['mprice'] = price_format(curResult['mprice']); memberPriceObj.text(curResult['mprice']); }else{ memberPriceObj.text("无"); } } //上面那个mprice有什么用的,俊杰看看,我先重写一个让多规格能够正常使用先 by zhaobin var PriceObj = $("#"+sys_item['price_id'][s_Hash]['HTMLPricePID']); if(PriceObj && curResult && curResult["price"] && !curResult['PackagePrice']){ if(curResult['price']){ if(is_int==1) { var price = curResult['price']; if(typeof(price)=='string') curResult['price'] = price.replace(/,/g, ""); curResult['price'] = parseFloat(curResult['price']); curResult['price'] = Math.round(curResult['price']);//是否取整 } curResult['price'] = price_format(curResult['price']); PriceObj.text(curResult['price']); }else{ PriceObj.text("无"); } } } function CheckStock(s_Hash){ var prodnumObj = $("#"+s_Hash+"_ProdNum"); var curNum = parseInt(prodnumObj.val()); var maxNum = parseInt(prodnumObj.data('maxnum')); if(!curNum || curNum<1)curNum = 1; if(maxNum 0 && $('body').width() < 767); } $(function(){ $('#productList_style_38_1608184595498 .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:tab_style_03_1608001947942 ===// 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://box6js.nicebox.cn/exusers/u_cart.php?idweb=27175&lang="+lang+"&pid="+pid+"&act=add&ismobile=1" + packStr; if (idspecprice) locationUrl += "&IDSpecPrice["+pid+"]="+idspecprice; if (isNaN(pid)) {//如果不是数字,表示批量加入购物车 locationUrl = "https://box6js.nicebox.cn/exusers/u_cart.php?idweb=27175&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://box6js.nicebox.cn/exusers/u_cart.php?idweb=27175&pid="+pid+"&act=add&lang="+lang+"&ispc=1" + packStr; if (idspecprice) locationUrl += "&IDSpecPrice["+pid+"]="+idspecprice; if (isNaN(pid)) {//如果不是数字,表示批量加入购物车 locationUrl = "https://box6js.nicebox.cn/exusers/u_cart.php?idweb=27175&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_38_1608535752499 .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:tab_style_03_1608001947942 ===// 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://box6js.nicebox.cn/exusers/u_cart.php?idweb=27175&lang="+lang+"&pid="+pid+"&act=add&ismobile=1" + packStr; if (idspecprice) locationUrl += "&IDSpecPrice["+pid+"]="+idspecprice; if (isNaN(pid)) {//如果不是数字,表示批量加入购物车 locationUrl = "https://box6js.nicebox.cn/exusers/u_cart.php?idweb=27175&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://box6js.nicebox.cn/exusers/u_cart.php?idweb=27175&pid="+pid+"&act=add&lang="+lang+"&ispc=1" + packStr; if (idspecprice) locationUrl += "&IDSpecPrice["+pid+"]="+idspecprice; if (isNaN(pid)) {//如果不是数字,表示批量加入购物车 locationUrl = "https://box6js.nicebox.cn/exusers/u_cart.php?idweb=27175&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_38_1608535479212 .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:tab_style_03_1608001947942 ===// 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://box6js.nicebox.cn/exusers/u_cart.php?idweb=27175&lang="+lang+"&pid="+pid+"&act=add&ismobile=1" + packStr; if (idspecprice) locationUrl += "&IDSpecPrice["+pid+"]="+idspecprice; if (isNaN(pid)) {//如果不是数字,表示批量加入购物车 locationUrl = "https://box6js.nicebox.cn/exusers/u_cart.php?idweb=27175&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://box6js.nicebox.cn/exusers/u_cart.php?idweb=27175&pid="+pid+"&act=add&lang="+lang+"&ispc=1" + packStr; if (idspecprice) locationUrl += "&IDSpecPrice["+pid+"]="+idspecprice; if (isNaN(pid)) {//如果不是数字,表示批量加入购物车 locationUrl = "https://box6js.nicebox.cn/exusers/u_cart.php?idweb=27175&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_38_1689928852745 .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:tab_style_03_1608001947942 ===// 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://box6js.nicebox.cn/exusers/u_cart.php?idweb=27175&lang="+lang+"&pid="+pid+"&act=add&ismobile=1" + packStr; if (idspecprice) locationUrl += "&IDSpecPrice["+pid+"]="+idspecprice; if (isNaN(pid)) {//如果不是数字,表示批量加入购物车 locationUrl = "https://box6js.nicebox.cn/exusers/u_cart.php?idweb=27175&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://box6js.nicebox.cn/exusers/u_cart.php?idweb=27175&pid="+pid+"&act=add&lang="+lang+"&ispc=1" + packStr; if (idspecprice) locationUrl += "&IDSpecPrice["+pid+"]="+idspecprice; if (isNaN(pid)) {//如果不是数字,表示批量加入购物车 locationUrl = "https://box6js.nicebox.cn/exusers/u_cart.php?idweb=27175&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_38_1608600326618 .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:tab_style_03_1608001947942 ===// 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://box6js.nicebox.cn/exusers/u_cart.php?idweb=27175&lang="+lang+"&pid="+pid+"&act=add&ismobile=1" + packStr; if (idspecprice) locationUrl += "&IDSpecPrice["+pid+"]="+idspecprice; if (isNaN(pid)) {//如果不是数字,表示批量加入购物车 locationUrl = "https://box6js.nicebox.cn/exusers/u_cart.php?idweb=27175&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://box6js.nicebox.cn/exusers/u_cart.php?idweb=27175&pid="+pid+"&act=add&lang="+lang+"&ispc=1" + packStr; if (idspecprice) locationUrl += "&IDSpecPrice["+pid+"]="+idspecprice; if (isNaN(pid)) {//如果不是数字,表示批量加入购物车 locationUrl = "https://box6js.nicebox.cn/exusers/u_cart.php?idweb=27175&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_38_1608600720799 .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:tab_style_03_1608001947942 ===// 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://box6js.nicebox.cn/exusers/u_cart.php?idweb=27175&lang="+lang+"&pid="+pid+"&act=add&ismobile=1" + packStr; if (idspecprice) locationUrl += "&IDSpecPrice["+pid+"]="+idspecprice; if (isNaN(pid)) {//如果不是数字,表示批量加入购物车 locationUrl = "https://box6js.nicebox.cn/exusers/u_cart.php?idweb=27175&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://box6js.nicebox.cn/exusers/u_cart.php?idweb=27175&pid="+pid+"&act=add&lang="+lang+"&ispc=1" + packStr; if (idspecprice) locationUrl += "&IDSpecPrice["+pid+"]="+idspecprice; if (isNaN(pid)) {//如果不是数字,表示批量加入购物车 locationUrl = "https://box6js.nicebox.cn/exusers/u_cart.php?idweb=27175&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_38_1699591392299 .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:tab_style_03_1608001947942 ===// 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://box6js.nicebox.cn/exusers/u_cart.php?idweb=27175&lang="+lang+"&pid="+pid+"&act=add&ismobile=1" + packStr; if (idspecprice) locationUrl += "&IDSpecPrice["+pid+"]="+idspecprice; if (isNaN(pid)) {//如果不是数字,表示批量加入购物车 locationUrl = "https://box6js.nicebox.cn/exusers/u_cart.php?idweb=27175&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://box6js.nicebox.cn/exusers/u_cart.php?idweb=27175&pid="+pid+"&act=add&lang="+lang+"&ispc=1" + packStr; if (idspecprice) locationUrl += "&IDSpecPrice["+pid+"]="+idspecprice; if (isNaN(pid)) {//如果不是数字,表示批量加入购物车 locationUrl = "https://box6js.nicebox.cn/exusers/u_cart.php?idweb=27175&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_38_1608600495398 .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:dh_style_28_1692334971057 ===// 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_28_1692334971057(){ $("#dh_style_28_1692334971057 .menuUl>li").each(function(){ $(this).find(".menuUl03").css("left",'100%'); }) } $(window).resize(function() { subLeft_dh_style_28_1692334971057(); }) $(function(){ $("#dh_style_28_1692334971057 .fa-navicon").click(function(){ $("#dh_style_28_1692334971057").addClass('clearTransform'); $("#dh_style_28_1692334971057 .menuUlCopy").each(function(){ $(this).siblings(".fa").show(); }) }) subLeft_dh_style_28_1692334971057(); $("#dh_style_28_1692334971057 .subBox").css("top",$("#dh_style_28_1692334971057 .menuUl_box").height()); if($("#dh_style_28_1692334971057 .menuUl").hasClass("noHover")){ var tabNum = 0; $("#dh_style_28_1692334971057 .menuUl>li").find(".Onsub").each(function(){ tabNum += 1; $(this).parent().attr("tabNum",tabNum) }) $("#dh_style_28_1692334971057 .menuUl>li .Onsub").mouseover(function(){ $("#dh_style_28_1692334971057 .subBox").show(); var index = $(this).parent().attr("tabNum"); $("#dh_style_28_1692334971057 .subBox .subItems").eq(index-1).fadeIn(100).siblings().hide(); $("#dh_style_28_1692334971057 .subBox .subMenuImgArea .subMenuImgCon").eq(0).fadeIn(100).siblings().hide(); }) $("#dh_style_28_1692334971057 .subBox").mouseleave(function(){ $(this).hide(); }); $("#dh_style_28_1692334971057 .menuUl>li .Nosub").mouseover(function(){ $("#dh_style_28_1692334971057 .subBox").hide(); }) //风格41 42 } }) var color = $('#dh_style_28_1692334971057 .menuStyle_28 .menuUl02 .subMenu02').css('background-color'); $('#dh_style_28_1692334971057 .menuStyle_28').append(``); $('#dh_style_28_1692334971057 .menuStyle_28 .menuUl02 .subMenu02').mouseover(function(){ let that = $(this); setTimeout(function(){ var hoverColor = that.css('background-color'); $('#dh_style_28_1692334971057 .menuStyle_28').append(``); },100); }); //=== viewid:text_default_1692335372115,text_default_1692335876144,text_default_1692264276318,text_default_1692264307741,text_default_1692335387160,text_default_1610608763433,text_default_1692334971059 ===// LA.init({id: "JhnZNFcR8UhdlU3j",ck: "JhnZNFcR8UhdlU3j"})