//=== 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,dh_style_28_1692334987161 ===// /*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:banner_style_04_1607303394315,banner_style_01_1610613596923 ===// //=== viewid:banner_style_01_1610613596923 ===// $(document).ready(function(){ arrowShow(); $(window).resize(function(){ arrowShow(); }); // 箭头显示 function arrowShow(){ if(window.screen.width<767 || ($('body').width() > 0 && $('body').width() < 767) || navigator.userAgent.indexOf('Mac OS X') != -1){ $("#banner_style_01_1610613596923 .bannerStyle_1 .awesome-font").show().siblings().hide(); }else{ $("#banner_style_01_1610613596923 .bannerStyle_1 .awesome-font").hide().siblings().show(); } } }); //=== viewid:banner_style_01_1610613596923 ===// /* * Banner 轮播图类 */ var intervaltimer; function Banner(config) { this._default = { 'list':[], 'length':0, 'current':0, 'timer':undefined, // 计时器 'view':undefined, // 视图 'flick':undefined, // 圆点选择器 'duration':3, // 切换时间间隔 'animation':0.5 // 动画时间 }; config = $.extend(true, this._default, config); this.config = config; this.init(config); } Banner.prototype.init = function(config) { this.animateStyle = 'normal'; // 动画效果 ( 根据动画效果, 不同的方法有不同的实现 ) this.direction = 'right'; // 当前滚动方向 this.view = this.config.view; this.config.length = this.config.list.length; this.config.flick = this.view ? this.view.find(".bannerStyle_1 .flicking_con > a") : undefined; }; // 计算下一个要显示的图片的索引 // by: 如果没有传入参数, 则使用配置中的数据this.config.current, 否则使用传入的参数 Banner.prototype.nextIndex = function(by) { by === undefined && (by = this.config.current); var next = this.direction == 'right' ? by + 1 : by - 1; next >= this.config.length && (next = 0); next < 0 && (next = this.config.length - 1); return next; }; //图片链接 $url_html = new Array(); $i = 0; $url_len = 2; $url_html[0] = "http://www.rephile.cn/2817705-2817705.html?pid=3003901&_t=1533619989"; $url_html[1] = "http://www.rephile.cn/2817705-2817705.html?pid=3003837&_t=1368064080"; $('#banner_style_01_1610613596923 a.img_url').attr('href',$url_html[$i]); // 跳到指定图片 Banner.prototype.animateIndex = function(index) { this.endAnimate(); if(index >= 0 && index < this.config.length && this.config.current != index) { if(this.config.current < index) { this.direction = 'right'; this.config.current = index - 1; } else { this.direction = 'left'; this.config.current = index + 1; } this.showIndex(this.config.current); this.startAnimate(); } }; // 向右动画 Banner.prototype.startAnimateRight = function() { this.direction = 'right'; this.startAnimate(); }; // 向左动画 Banner.prototype.startAnimateLeft = function() { this.direction = 'left'; this.startAnimate(); }; // 结束动画 Banner.prototype.endAnimate = function() { clearTimeout(this.config.timer); }; // 结束动画 Banner.prototype.hoverEndAnimate = function() { var that = this; intervaltimer = setInterval(function(){ clearTimeout(that.config.timer); },100); }; Banner.prototype.startAnimate = function() { switch(this.animateStyle) { case 'normal': // 默认效果 this.endAnimate(); if(this.config.length > 1) { var prev = this.config.current, next = this.nextIndex(), end = this.direction == 'right' ? {prev:"-100%", current:"100%"} : {prev:"100%", current:"-100%"}; // 前一个图片和当前图片的最后停留位置 this.config.flick.eq(next).addClass("on").siblings().removeClass("on"); // 执行动画 var banner = this; this.imgs.eq(prev).stop().animate({"left":end.prev}, this.config.animation, function(){ banner.config.timer = setTimeout(function(){ banner.startAnimate(); },banner.config.duration); }); this.imgs.eq(next).css({"left":end.current}).stop().animate({"left":"0%"}, this.config.animation); this.config.current = next; } break; case 'rotate-3d': // 3D旋转效果 this.endAnimate(); this.updateBgImg(); if(this.config.length > 1) { var prev = this.config.current, next = this.nextIndex(); this.config.flick.eq(next).addClass("on").siblings().removeClass("on"); this.config.current = next; this.parts.css("transform", "rotateX(" + ((this.direction == 'right' ? ++this.rotate : --this.rotate) * 90) + "deg)"); var banner = this; this.config.timer = setTimeout(function(){ banner.startAnimate(); },banner.config.duration); } $('#banner_style_01_1610613596923 a.img_url').attr('href',$url_html[this.config.current]); break; } }; // 指定显示的图片 Banner.prototype.showIndex = function(index) { switch(this.animateStyle) { case 'normal': // 默认效果 this.imgs.eq(index).css("left","0%").siblings(".img-item").css("left","100%"); this.config.flick.eq(index).addClass("on").siblings().removeClass("on"); break; case 'rotate-3d': // 3D旋转效果 this.updateFaceBottonTopImg(index); this.config.flick.eq(index).addClass("on").siblings().removeClass("on"); break; } }; /* * ******************************************** * 3D旋转效果 特有函数 begin */ // 每次旋转前都需要更新背部的图片 Banner.prototype.updateBgImg = function() { // 计算背部要显示的图片 var bg_image_index = this.nextIndex(this.nextIndex()); // index: 计算背景图片当前显示在哪个img中( 总共有4个图片, 分别位于正面/底部/背部/顶部, 索引分别为0, 1, 2, 3 ) var c, index = (c = (this.rotate + 2) % 4) >= 0 ? c : c + 4; var banner = this; // console.log('第',index,'个面-使用更新为第',bg_image_index,'张图'); this.parts && this.parts.each(function () { $(this).find('.img:eq('+index+')').css({'background-image': 'url("'+banner.config.list[bg_image_index]+'")'}); }); }; // 更新正面/顶部/底部的图片 // index: 要显示哪张图片 // 备注: 因为总共有四个面的图片需要更新, 初始化时, 正面/顶部/底部的图片只需更新一次即可 (背部的图片在每次旋转前都需要更新) Banner.prototype.updateFaceBottonTopImg = function(index) { // face, bottom, top: 计算正面/顶部/底部图片当前显示在哪个img中( 总共有4个图片, 分别位于正面/底部/背部/顶部, 索引分别为0, 1, 2, 3 ) var c, face = (c = this.rotate % 4) >= 0 ? c : c + 4, bottom, top; bottom = face + 1; bottom >= this.config.length && (bottom = 0); top = face - 1; top < 0 && (top = this.config.length - 1); var banner = this; this.parts && this.parts.each(function () { // console.log('第',face,'个面-使用更新为第',index,'张图'); $(this).find('.img:eq('+face+')').css({'background-image': 'url("'+banner.config.list[index]+'")'}); // console.log('第',bottom,'个面-使用更新为第',index < banner.config.length - 1 ? index + 1 : 0,'张图'); $(this).find('.img:eq('+bottom+')').css({'background-image': 'url("'+banner.config.list[index < banner.config.length - 1 ? index + 1 : 0]+'")'}); // console.log('第',top,'个面-使用更新为第',index > 0 ? index - 1 : banner.config.length - 1,'张图'); $(this).find('.img:eq('+top+')').css({'background-image': 'url("'+banner.config.list[index > 0 ? index - 1 : banner.config.length - 1]+'")'}); }); }; // 初始化旋转部分: 设置3d旋转的四个面的图片, index表示默认显示哪张图片 Banner.prototype.initImgPart = function(index) { var banner = this; this.parts && this.parts.each(function () { $(this).find('.img').each(function (i) { var j = 0; switch (i) { case 0: j = index; break; // 正面 case 1: j = index + 1; break; // 底部 case 2: break; // 背部 case 3: j = index - 1; break; // 顶部 } j >= banner.config.length && (j = 0); j < 0 && (j = banner.config.length - 1); $(this).css({'background-image': 'url("'+banner.config.list[j]+'")', 'background-repeat':'no-repeat', 'background-color':'#fff'}); }); }); }; // 更新旋转部分: 之所以使用定时器, 是因为无法实时获取模块宽度 Banner.prototype.updateImgPart = function() { this.parts && this.parts.each(function(index) { $(this).css({ "left":$(this).width() * index + "px" }); $(this).find(".img").css({ "background-position": -$(this).width() * index + "px" }); }); var banner = this; setTimeout(function () { banner.updateImgPart(); }, 800); }; /* * 3D旋转效果 特有函数 end * ******************************************** */ // 图片数据 var list_banner_style_01_1610613596923 = []; list_banner_style_01_1610613596923.push('/picture/banner/智能型纯水超纯水系统 Genie.jpg');list_banner_style_01_1610613596923.push('/picture/banner/大流量智能纯水系统Super-Genie.jpg'); var banner_banner_style_01_1610613596923; // 轮播图对象 $(function(){ // 创建轮播图 $arrHref = new Array(); banner_banner_style_01_1610613596923 = new Banner({ 'list':list_banner_style_01_1610613596923, 'view':$('#banner_style_01_1610613596923'), 'duration':parseFloat('3') * 1000, 'animation':parseFloat('0.5') * 1000 }); banner_banner_style_01_1610613596923.animateStyle = 'normal'; banner_banner_style_01_1610613596923.imgs = banner_banner_style_01_1610613596923.view.find(".bannerStyle_1 .main_image .img-list").children(".img-item"); banner_banner_style_01_1610613596923.view.find('a').each(function (i) { $(this).click(function () { if(!$(this).attr('href')) { return false; } }); }); banner_banner_style_01_1610613596923.view.find('a.picSet').each(function(i){ $arrHref[i] = $(this).attr('href'); }); // 显示指定索引的图片 banner_banner_style_01_1610613596923.showIndex(banner_banner_style_01_1610613596923.config.current); // 监听 点击圆点 banner_banner_style_01_1610613596923.config.flick.click(function(){ banner_banner_style_01_1610613596923.animateIndex($(this).index()); $('#banner_style_01_1610613596923 a.img_url').attr('href',$url_html[$(this).index()]); $i = $(this).index(); return false; }); // 监听 鼠标悬浮时 banner_banner_style_01_1610613596923.view.hover( function(){ banner_banner_style_01_1610613596923.hoverEndAnimate(); banner_banner_style_01_1610613596923.view.find(".bannerStyle_1 .btn_prev, .bannerStyle_1 .btn_next").fadeIn(); }, function(){ clearInterval(intervaltimer); banner_banner_style_01_1610613596923.config.timer = setTimeout(function(){ banner_banner_style_01_1610613596923.startAnimateRight(); },banner_banner_style_01_1610613596923.config.duration); banner_banner_style_01_1610613596923.view.find(".bannerStyle_1 .btn_prev, .bannerStyle_1 .btn_next").fadeOut() } ); // 监听 点击左右按钮 banner_banner_style_01_1610613596923.view.find(".btn_prev").click(function() { banner_banner_style_01_1610613596923.startAnimateLeft(); }); banner_banner_style_01_1610613596923.view.find(".btn_next").click(function() { banner_banner_style_01_1610613596923.startAnimateRight(); }); // 监听 触摸事件 var touchVal = null; document.addEventListener("touchstart", function(e){ if($(e.target).is(banner_banner_style_01_1610613596923.view) || $(e.target).closest("#"+banner_banner_style_01_1610613596923.view.attr("id")).length > 0) { touchVal = {}; touchVal.downX = e.touches[0].clientX; // 记录触摸起始位置 } }, false); document.addEventListener("touchmove", function(e){ if(touchVal && touchVal.downX) { touchVal.moveX = e.touches[0].clientX - touchVal.downX; // 计算触摸中的偏移位置 } }, false); document.addEventListener("touchend", function(e){ if(touchVal && touchVal.moveX){ if(touchVal.moveX > 30){ banner_banner_style_01_1610613596923.startAnimateLeft(); // 触摸生效 if (e.preventDefault) { e.preventDefault(); } else { e.returnvalue = false; } }else if(touchVal.moveX < -30){ banner_banner_style_01_1610613596923.startAnimateRight(); // 触摸生效 if (e.preventDefault) { e.preventDefault(); } else { e.returnvalue = false; } } } touchVal = null; }, false); // 运行 banner_banner_style_01_1610613596923.config.timer = setTimeout(function(){ banner_banner_style_01_1610613596923.startAnimateRight(); }, banner_banner_style_01_1610613596923.config.duration); }); //=== viewid:tab_style_03_1608001947942,productList_style_38_1608602877783 ===// 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_1608602877783 .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:text_default_1594179296751,text_default_1678349887497 ===// //=== viewid:productList_style_38_1678350428197 ===// //-- $(function(){ var viewid="productList_style_38_1678350428197"; var sys_url="viewid=productList_style_38_1678350428197&name=productList&style=style_38&langid=0&pageid=2817665&viewCtrl=default&this_group_id=861429&m_token=0c&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_38_1678350428197; } } RequestURL(viewid,sys_url,moreParams); }); //-- //=== viewid:productList_style_38_1678350428197 ===// var showSub = '0'; if(showSub == 0){ $('#productList_style_38_1678350428197 .prod_default38 .float_kind').hide(); $('#productList_style_38_1678350428197 .prod_default38 .moreBtn .fa-angle-down').removeClass('tran_rotate'); $('#productList_style_38_1678350428197 .prod_default38 .moreBtn .textclase').addClass('texthide'); $('#productList_style_38_1678350428197 .prod_default38 .moreBtn .textopen').removeClass('texthide'); }else{ $('#productList_style_38_1678350428197 .prod_default38 .float_kind').show(); $('#productList_style_38_1678350428197 .prod_default38 .moreBtn .fa-angle-down').addClass('tran_rotate'); $('#productList_style_38_1678350428197 .prod_default38 .moreBtn .textopen').addClass('texthide'); $('#productList_style_38_1678350428197 .prod_default38 .moreBtn .textclase').removeClass('texthide'); } $('#productList_style_38_1678350428197 .prod_default38 .moreBtn .div_mode,#productList_style_38_1678350428197 .sure_btn .sure').click(function(){ showSub = showSub==1?0:1; $('#productList_style_38_1678350428197 .prod_default38').find('.fa-angle-down').toggleClass('tran_rotate'); $('#productList_style_38_1678350428197 .prod_default38').find('.textopen,.textclase').toggleClass('texthide'); $('#productList_style_38_1678350428197 .prod_default38 .float_kind').toggle(); }) $('#productList_style_38_1678350428197 .prod_li_kind').each(function(){ $(this).click(function(){ window.history.pushState({},0,"#productList_style_38_1678350428197"); var gid = $(this).attr('data-gid'); var gsubid = $(this).attr('data-gsubid'); RequestURL('productList_style_38_1678350428197','viewid=productList_style_38_1678350428197&name=productList&style=style_38&langid=0&pageid=2817665&viewCtrl=default&this_group_id=861429&m_token=0c'+'&postPgid='+gid+'&postPgsubid=0&postPgthrid=0&showSub='+showSub); }); }); $('#productList_style_38_1678350428197 .prod_subli_kind').each(function(){ $(this).click(function(){ window.history.pushState({},0,"#productList_style_38_1678350428197"); var gid = $(this).attr('data-gid'); var gsubid = $(this).attr('data-gsubid'); RequestURL('productList_style_38_1678350428197','viewid=productList_style_38_1678350428197&name=productList&style=style_38&langid=0&pageid=2817665&viewCtrl=default&this_group_id=861429&m_token=0c'+'&postPgid='+gid+'&postPgsubid='+gsubid+'&postPgthrid=0&showSub='+showSub); }); }); $('#productList_style_38_1678350428197 .prod_thrli_kind').each(function(){ $(this).click(function(){ window.history.pushState({},0,"#productList_style_38_1678350428197"); var gid = $(this).attr('data-gid'); var gsubid = $(this).attr('data-gsubid'); var gthrid = $(this).attr('data-gthrid'); RequestURL('productList_style_38_1678350428197','viewid=productList_style_38_1678350428197&name=productList&style=style_38&langid=0&pageid=2817665&viewCtrl=default&this_group_id=861429&m_token=0c'+'&postPgid='+gid+'&postPgsubid='+gsubid+'&postPgthrid='+gthrid+'&showSub='+showSub); }); }); //=== viewid:productList_style_38_1678350428197 ===// 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_1678350428197 .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:productList_style_38_1608602839062 ===// //-- $(function(){ var viewid="productList_style_38_1608602839062"; var sys_url="viewid=productList_style_38_1608602839062&name=productList&style=style_38&langid=0&pageid=2817665&viewCtrl=default&this_group_id=846529&m_token=db&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_38_1608602839062; } } RequestURL(viewid,sys_url,moreParams); }); //-- //=== viewid:productList_style_38_1608602839062 ===// var showSub = '0'; if(showSub == 0){ $('#productList_style_38_1608602839062 .prod_default38 .float_kind').hide(); $('#productList_style_38_1608602839062 .prod_default38 .moreBtn .fa-angle-down').removeClass('tran_rotate'); $('#productList_style_38_1608602839062 .prod_default38 .moreBtn .textclase').addClass('texthide'); $('#productList_style_38_1608602839062 .prod_default38 .moreBtn .textopen').removeClass('texthide'); }else{ $('#productList_style_38_1608602839062 .prod_default38 .float_kind').show(); $('#productList_style_38_1608602839062 .prod_default38 .moreBtn .fa-angle-down').addClass('tran_rotate'); $('#productList_style_38_1608602839062 .prod_default38 .moreBtn .textopen').addClass('texthide'); $('#productList_style_38_1608602839062 .prod_default38 .moreBtn .textclase').removeClass('texthide'); } $('#productList_style_38_1608602839062 .prod_default38 .moreBtn .div_mode,#productList_style_38_1608602839062 .sure_btn .sure').click(function(){ showSub = showSub==1?0:1; $('#productList_style_38_1608602839062 .prod_default38').find('.fa-angle-down').toggleClass('tran_rotate'); $('#productList_style_38_1608602839062 .prod_default38').find('.textopen,.textclase').toggleClass('texthide'); $('#productList_style_38_1608602839062 .prod_default38 .float_kind').toggle(); }) $('#productList_style_38_1608602839062 .prod_li_kind').each(function(){ $(this).click(function(){ window.history.pushState({},0,"#productList_style_38_1608602839062"); var gid = $(this).attr('data-gid'); var gsubid = $(this).attr('data-gsubid'); RequestURL('productList_style_38_1608602839062','viewid=productList_style_38_1608602839062&name=productList&style=style_38&langid=0&pageid=2817665&viewCtrl=default&this_group_id=846529&m_token=db'+'&postPgid='+gid+'&postPgsubid=0&postPgthrid=0&showSub='+showSub); }); }); $('#productList_style_38_1608602839062 .prod_subli_kind').each(function(){ $(this).click(function(){ window.history.pushState({},0,"#productList_style_38_1608602839062"); var gid = $(this).attr('data-gid'); var gsubid = $(this).attr('data-gsubid'); RequestURL('productList_style_38_1608602839062','viewid=productList_style_38_1608602839062&name=productList&style=style_38&langid=0&pageid=2817665&viewCtrl=default&this_group_id=846529&m_token=db'+'&postPgid='+gid+'&postPgsubid='+gsubid+'&postPgthrid=0&showSub='+showSub); }); }); $('#productList_style_38_1608602839062 .prod_thrli_kind').each(function(){ $(this).click(function(){ window.history.pushState({},0,"#productList_style_38_1608602839062"); var gid = $(this).attr('data-gid'); var gsubid = $(this).attr('data-gsubid'); var gthrid = $(this).attr('data-gthrid'); RequestURL('productList_style_38_1608602839062','viewid=productList_style_38_1608602839062&name=productList&style=style_38&langid=0&pageid=2817665&viewCtrl=default&this_group_id=846529&m_token=db'+'&postPgid='+gid+'&postPgsubid='+gsubid+'&postPgthrid='+gthrid+'&showSub='+showSub); }); }); //=== viewid:productList_style_38_1608602839062 ===// 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_1608602839062 .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:productList_style_38_1608603111970 ===// //-- $(function(){ var viewid="productList_style_38_1608603111970"; var sys_url="viewid=productList_style_38_1608603111970&name=productList&style=style_38&langid=0&pageid=2817665&viewCtrl=default&this_group_id=846533&m_token=63&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_38_1608603111970; } } RequestURL(viewid,sys_url,moreParams); }); //-- //=== viewid:productList_style_38_1608603111970 ===// var showSub = '0'; if(showSub == 0){ $('#productList_style_38_1608603111970 .prod_default38 .float_kind').hide(); $('#productList_style_38_1608603111970 .prod_default38 .moreBtn .fa-angle-down').removeClass('tran_rotate'); $('#productList_style_38_1608603111970 .prod_default38 .moreBtn .textclase').addClass('texthide'); $('#productList_style_38_1608603111970 .prod_default38 .moreBtn .textopen').removeClass('texthide'); }else{ $('#productList_style_38_1608603111970 .prod_default38 .float_kind').show(); $('#productList_style_38_1608603111970 .prod_default38 .moreBtn .fa-angle-down').addClass('tran_rotate'); $('#productList_style_38_1608603111970 .prod_default38 .moreBtn .textopen').addClass('texthide'); $('#productList_style_38_1608603111970 .prod_default38 .moreBtn .textclase').removeClass('texthide'); } $('#productList_style_38_1608603111970 .prod_default38 .moreBtn .div_mode,#productList_style_38_1608603111970 .sure_btn .sure').click(function(){ showSub = showSub==1?0:1; $('#productList_style_38_1608603111970 .prod_default38').find('.fa-angle-down').toggleClass('tran_rotate'); $('#productList_style_38_1608603111970 .prod_default38').find('.textopen,.textclase').toggleClass('texthide'); $('#productList_style_38_1608603111970 .prod_default38 .float_kind').toggle(); }) $('#productList_style_38_1608603111970 .prod_li_kind').each(function(){ $(this).click(function(){ window.history.pushState({},0,"#productList_style_38_1608603111970"); var gid = $(this).attr('data-gid'); var gsubid = $(this).attr('data-gsubid'); RequestURL('productList_style_38_1608603111970','viewid=productList_style_38_1608603111970&name=productList&style=style_38&langid=0&pageid=2817665&viewCtrl=default&this_group_id=846533&m_token=63'+'&postPgid='+gid+'&postPgsubid=0&postPgthrid=0&showSub='+showSub); }); }); $('#productList_style_38_1608603111970 .prod_subli_kind').each(function(){ $(this).click(function(){ window.history.pushState({},0,"#productList_style_38_1608603111970"); var gid = $(this).attr('data-gid'); var gsubid = $(this).attr('data-gsubid'); RequestURL('productList_style_38_1608603111970','viewid=productList_style_38_1608603111970&name=productList&style=style_38&langid=0&pageid=2817665&viewCtrl=default&this_group_id=846533&m_token=63'+'&postPgid='+gid+'&postPgsubid='+gsubid+'&postPgthrid=0&showSub='+showSub); }); }); $('#productList_style_38_1608603111970 .prod_thrli_kind').each(function(){ $(this).click(function(){ window.history.pushState({},0,"#productList_style_38_1608603111970"); var gid = $(this).attr('data-gid'); var gsubid = $(this).attr('data-gsubid'); var gthrid = $(this).attr('data-gthrid'); RequestURL('productList_style_38_1608603111970','viewid=productList_style_38_1608603111970&name=productList&style=style_38&langid=0&pageid=2817665&viewCtrl=default&this_group_id=846533&m_token=63'+'&postPgid='+gid+'&postPgsubid='+gsubid+'&postPgthrid='+gthrid+'&showSub='+showSub); }); }); //=== viewid:productList_style_38_1608603111970 ===// 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_1608603111970 .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_1692334987161 ===// 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_1692334987161(){ $("#dh_style_28_1692334987161 .menuUl>li").each(function(){ $(this).find(".menuUl03").css("left",'100%'); }) } $(window).resize(function() { subLeft_dh_style_28_1692334987161(); }) $(function(){ $("#dh_style_28_1692334987161 .fa-navicon").click(function(){ $("#dh_style_28_1692334987161").addClass('clearTransform'); $("#dh_style_28_1692334987161 .menuUlCopy").each(function(){ $(this).siblings(".fa").show(); }) }) subLeft_dh_style_28_1692334987161(); $("#dh_style_28_1692334987161 .subBox").css("top",$("#dh_style_28_1692334987161 .menuUl_box").height()); if($("#dh_style_28_1692334987161 .menuUl").hasClass("noHover")){ var tabNum = 0; $("#dh_style_28_1692334987161 .menuUl>li").find(".Onsub").each(function(){ tabNum += 1; $(this).parent().attr("tabNum",tabNum) }) $("#dh_style_28_1692334987161 .menuUl>li .Onsub").mouseover(function(){ $("#dh_style_28_1692334987161 .subBox").show(); var index = $(this).parent().attr("tabNum"); $("#dh_style_28_1692334987161 .subBox .subItems").eq(index-1).fadeIn(100).siblings().hide(); $("#dh_style_28_1692334987161 .subBox .subMenuImgArea .subMenuImgCon").eq(0).fadeIn(100).siblings().hide(); }) $("#dh_style_28_1692334987161 .subBox").mouseleave(function(){ $(this).hide(); }); $("#dh_style_28_1692334987161 .menuUl>li .Nosub").mouseover(function(){ $("#dh_style_28_1692334987161 .subBox").hide(); }) //风格41 42 } }) var color = $('#dh_style_28_1692334987161 .menuStyle_28 .menuUl02 .subMenu02').css('background-color'); $('#dh_style_28_1692334987161 .menuStyle_28').append(``); $('#dh_style_28_1692334987161 .menuStyle_28 .menuUl02 .subMenu02').mouseover(function(){ let that = $(this); setTimeout(function(){ var hoverColor = that.css('background-color'); $('#dh_style_28_1692334987161 .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,text_default_1692334987166 ===// LA.init({id: "JhnZNFcR8UhdlU3j",ck: "JhnZNFcR8UhdlU3j"})